git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #25398 from ljli/ghci-sys-libs

haskell: set LD_LIBRARY_PATH in shellHook

commita9737f610f3cd36c86b0e2dcb90c5e173b095336 authorPeter Simons <simons@cryp.to> dateWed 3 May 2017, 15:50 (10 years ago) parent4ea520ce73e5c8
1 file changed+5−1
pkgs/development/haskell-modules/generic-builder.nix+5−1
pkgs/development/haskell-modules/generic-builder.nix+5−1
@@ -63,7 +63,8 @@ assert enableSplitObjs == null;
6363let
6464
6565 inherit (stdenv.lib) optional optionals optionalString versionOlder versionAtLeast
66− concatStringsSep enableFeature optionalAttrs toUpper;
66+ concatStringsSep enableFeature optionalAttrs toUpper
67+ filter makeLibraryPath;
6768
6869 isGhcjs = ghc.isGhcjs or false;
6970 isHaLVM = ghc.isHaLVM or false;
@@ -330,6 +331,9 @@ stdenv.mkDerivation ({
330331 export NIX_${ghcCommandCaps}="${ghcEnv}/bin/${ghcCommand}"
331332 export NIX_${ghcCommandCaps}PKG="${ghcEnv}/bin/${ghcCommand}-pkg"
332333 export NIX_${ghcCommandCaps}_DOCDIR="${ghcEnv}/share/doc/ghc/html"
334+ export LD_LIBRARY_PATH="''${LD_LIBRARY_PATH:+''${LD_LIBRARY_PATH}:}${
335+ makeLibraryPath (filter (x: !isNull x) systemBuildInputs)
336+ }"
333337 ${if isHaLVM
334338 then ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/HaLVM-${ghc.version}"''
335339 else ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/${ghcCommand}-${ghc.version}"''}