diff options
author | Malte Brandy <malte.brandy@maralorn.de> | 2020-06-04 02:48:57 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2020-06-05 21:58:25 +0200 |
commit | 4e67e3da06d0282f30c27cda547c91e10a483a66 (patch) | |
tree | 73501bce438a45bd78407360b5305e00c36e7bd9 /pkgs/development/haskell-modules | |
parent | cba12133a610c041ffb22117985212770ec6cc6c (diff) | |
download | nixlib-4e67e3da06d0282f30c27cda547c91e10a483a66.tar nixlib-4e67e3da06d0282f30c27cda547c91e10a483a66.tar.gz nixlib-4e67e3da06d0282f30c27cda547c91e10a483a66.tar.bz2 nixlib-4e67e3da06d0282f30c27cda547c91e10a483a66.tar.lz nixlib-4e67e3da06d0282f30c27cda547c91e10a483a66.tar.xz nixlib-4e67e3da06d0282f30c27cda547c91e10a483a66.tar.zst nixlib-4e67e3da06d0282f30c27cda547c91e10a483a66.zip |
ghc.withPackages: Add wrapper for ghcide
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r-- | pkgs/development/haskell-modules/with-packages-wrapper.nix | 9 |
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"; |