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.
commit475c8bfb7d13de76d6e0ff1c052ad95b2754d7e2
authorChristian Gram Kalhauge <christian@kalhauge.dk>
dateWed 20 Jul 2016, 14:21 (10 years ago)
parente75332d
pkgs/development/haskell-modules/generic-builder.nix+3
@@ -193,6 +193,9 @@ stdenv.mkDerivation ({
193193 fi
194194 if [ -d "$p/lib" ]; then
195195 configureFlags+=" --extra-lib-dirs=$p/lib"
196+ if [[ ${ if stdenv.isDarwin then "yes" else "no"} = "yes" ]]; then
197+ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$p/lib;
198+ fi
196199 fi
197200 done
198201 ${ghcCommand}-pkg --${packageDbFlag}="$packageConfDir" recache