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.
This commit is contained in:
Christian Gram Kalhauge 2016-07-20 14:21:53 +02:00
parent e75332dd7e
commit 475c8bfb7d

View File

@ -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