about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/with-packages-wrapper.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-06-07 09:25:12 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-06-07 09:25:12 +0200
commit6b8223e634b1326f448b870351ae53a0607aa043 (patch)
treecc1754cc8e195a5b84bdadf0d01db22f73da25af /pkgs/development/haskell-modules/with-packages-wrapper.nix
parent43f71029cc6b18c1b4db4d01b35dbb30425c2f4e (diff)
parent1c3e3e081c22ba4dbf8f1b8cb31a55830596b838 (diff)
downloadnixlib-6b8223e634b1326f448b870351ae53a0607aa043.tar
nixlib-6b8223e634b1326f448b870351ae53a0607aa043.tar.gz
nixlib-6b8223e634b1326f448b870351ae53a0607aa043.tar.bz2
nixlib-6b8223e634b1326f448b870351ae53a0607aa043.tar.lz
nixlib-6b8223e634b1326f448b870351ae53a0607aa043.tar.xz
nixlib-6b8223e634b1326f448b870351ae53a0607aa043.tar.zst
nixlib-6b8223e634b1326f448b870351ae53a0607aa043.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/haskell-modules/with-packages-wrapper.nix')
-rw-r--r--pkgs/development/haskell-modules/with-packages-wrapper.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix
index 32fa46fd04ac..3b8d906cecef 100644
--- a/pkgs/development/haskell-modules/with-packages-wrapper.nix
+++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix
@@ -105,6 +105,15 @@ symlinkJoin {
         --set "NIX_${ghcCommandCaps}_LIBDIR" "${libDir}"
     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) ''
     # Work around a linker limit in macOS Sierra (see generic-builder.nix):
     local packageConfDir="$out/lib/${ghc.name}/package.conf.d";