haskell.lib.buildStackProject: fix treatment of LD_LIBRARY_PATH.

Don't make LD_LIBRARY_PATH pick up cwd when original string is empty,
due to colon terminated search path.
This commit is contained in:
Mathieu Boespflug 2016-06-13 00:53:20 +02:00
parent e6aa4e0ccb
commit 70bc97b731

View file

@ -4,7 +4,7 @@ with stdenv.lib;
{ buildInputs ? []
, extraArgs ? []
, LD_LIBRARY_PATH ? ""
, LD_LIBRARY_PATH ? []
, ghc ? ghc
, ...
}@args:
@ -23,7 +23,7 @@ stdenv.mkDerivation (args // {
extraArgs;
# XXX: workaround for https://ghc.haskell.org/trac/ghc/ticket/11042.
LD_LIBRARY_PATH = "${makeLibraryPath buildInputs}:${LD_LIBRARY_PATH}";
LD_LIBRARY_PATH = makeLibraryPath (LD_LIBRARY_PATH ++ buildInputs);
preferLocalBuild = true;