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