summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorChristian Gram Kalhauge <christian@kalhauge.dk>2016-07-20 14:21:53 +0200
committerChristian Gram Kalhauge <christian@kalhauge.dk>2016-07-20 14:21:53 +0200
commit475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2 (patch)
tree903669e8daa2e379efa686408b115fe06701c2d8 /pkgs
parente75332dd7e96f8ad33d9e7130b2f977071763c29 (diff)
downloadnixlib-475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2.tar
nixlib-475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2.tar.gz
nixlib-475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2.tar.bz2
nixlib-475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2.tar.lz
nixlib-475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2.tar.xz
nixlib-475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2.tar.zst
nixlib-475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2.zip
Fix DLYD problem with haskell libraries on Darwin
This commit fixes a problem that occurs with externally linked haskell
libraries on Darwin. It does this by adding the libraries to the
--extra-lib-dirs flag and the DYLD_LIBRARY_PATH environment variable.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index 72110227140b..2bcf6ee854f6 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -193,6 +193,9 @@ stdenv.mkDerivation ({
       fi
       if [ -d "$p/lib" ]; then
         configureFlags+=" --extra-lib-dirs=$p/lib"
+        if [[ ${ if stdenv.isDarwin then "yes" else "no"} = "yes" ]]; then
+          export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$p/lib;
+        fi
       fi
     done
     ${ghcCommand}-pkg --${packageDbFlag}="$packageConfDir" recache