diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index c633310a37a4..e4ae24f74fab 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -243,7 +243,7 @@ stdenv.mkDerivation ({ # libraries) from all the dependencies. local dynamicLinksDir="$out/lib/links" mkdir -p $dynamicLinksDir - for d in $(grep dynamic-library-dirs "$packageConfDir/"*|awk '{print $2}'); do + for d in $(grep dynamic-library-dirs "$packageConfDir/"*|awk '{print $2}'|sort -u); do ln -s "$d/"*.dylib $dynamicLinksDir done # Edit the local package DB to reference the links directory.