ghc.withPackages: Add wrapper for ghcide
This commit is contained in:
parent
cba12133a6
commit
4e67e3da06
@ -105,6 +105,15 @@ symlinkJoin {
|
|||||||
--set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
|
--set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ghcide does package discovery without calling our ghc wrapper.
|
||||||
|
if [[ -x "$out/bin/ghcide" ]]; then
|
||||||
|
wrapProgram $out/bin/ghcide \
|
||||||
|
--set "NIX_${ghcCommandCaps}" "$out/bin/${ghcCommand}" \
|
||||||
|
--set "NIX_${ghcCommandCaps}PKG" "$out/bin/${ghcCommand}-pkg" \
|
||||||
|
--set "NIX_${ghcCommandCaps}_DOCDIR" "${docDir}" \
|
||||||
|
--set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
|
||||||
|
fi
|
||||||
|
|
||||||
'' + (lib.optionalString (stdenv.targetPlatform.isDarwin && !isGhcjs && !stdenv.targetPlatform.isiOS) ''
|
'' + (lib.optionalString (stdenv.targetPlatform.isDarwin && !isGhcjs && !stdenv.targetPlatform.isiOS) ''
|
||||||
# Work around a linker limit in macOS Sierra (see generic-builder.nix):
|
# Work around a linker limit in macOS Sierra (see generic-builder.nix):
|
||||||
local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
|
local packageConfDir="$out/lib/${ghc.name}/package.conf.d";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user