From 70bc97b731c74beb95b3cb95939ed6b9ea02b9b8 Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Mon, 13 Jun 2016 00:53:20 +0200 Subject: [PATCH] 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. --- pkgs/development/haskell-modules/generic-stack-builder.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/generic-stack-builder.nix b/pkgs/development/haskell-modules/generic-stack-builder.nix index caada71632d..07421b1d14f 100644 --- a/pkgs/development/haskell-modules/generic-stack-builder.nix +++ b/pkgs/development/haskell-modules/generic-stack-builder.nix @@ -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;