Skip to content

Commit

Permalink
Merge pull request #25398 from ljli/ghci-sys-libs
Browse files Browse the repository at this point in the history
haskell: set LD_LIBRARY_PATH in shellHook
  • Loading branch information
peti committed May 3, 2017
2 parents 4ea520c + e73e5c8 commit a9737f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkgs/development/haskell-modules/generic-builder.nix
Expand Up @@ -63,7 +63,8 @@ assert enableSplitObjs == null;
let

inherit (stdenv.lib) optional optionals optionalString versionOlder versionAtLeast
concatStringsSep enableFeature optionalAttrs toUpper;
concatStringsSep enableFeature optionalAttrs toUpper
filter makeLibraryPath;

isGhcjs = ghc.isGhcjs or false;
isHaLVM = ghc.isHaLVM or false;
Expand Down Expand Up @@ -330,6 +331,9 @@ stdenv.mkDerivation ({
export NIX_${ghcCommandCaps}="${ghcEnv}/bin/${ghcCommand}"
export NIX_${ghcCommandCaps}PKG="${ghcEnv}/bin/${ghcCommand}-pkg"
export NIX_${ghcCommandCaps}_DOCDIR="${ghcEnv}/share/doc/ghc/html"
export LD_LIBRARY_PATH="''${LD_LIBRARY_PATH:+''${LD_LIBRARY_PATH}:}${
makeLibraryPath (filter (x: !isNull x) systemBuildInputs)
}"
${if isHaLVM
then ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/HaLVM-${ghc.version}"''
else ''export NIX_${ghcCommandCaps}_LIBDIR="${ghcEnv}/lib/${ghcCommand}-${ghc.version}"''}
Expand Down

0 comments on commit a9737f6

Please sign in to comment.