git.iko.soy/typeable/nixpkgs
on master help sign in
haskell/generic-builder.nix: Fix C lib multiple inclusions

Allow the darwin links code to overwrite libs that were already copied, because C dependencies can occur multiple times. Solves errors like ln: failed to create symbolic link '/nix/store/higpc9xavwcjjzdipz7m9ly03bh7iy2z-hercules-ci-agent-source-0.7.0/lib/links/libboost_context.dylib': File exists

commit4353027d0b535b9c22c3c5d0de58718590483a28 authorRobert Hensing <robert@roberthensing.nl> dateThu 14 May 2020, 15:26 (7 years ago) parent4ed93cc
1 file changed+2−1
pkgs/development/haskell-modules/generic-builder.nix+2−1
pkgs/development/haskell-modules/generic-builder.nix+2−1
@@ -383,7 +383,8 @@ stdenv.mkDerivation ({
383383
384384 for d in $(grep '^dynamic-library-dirs:' "$packageConfDir"/* | cut -d' ' -f2- | tr ' ' '\n' | sort -u); do
385385 for lib in "$d/"*.{dylib,so}; do
386− ln -s "$lib" "$dynamicLinksDir"
386+ # Allow overwriting because C libs can be pulled in multiple times.
387+ ln -sf "$lib" "$dynamicLinksDir"
387388 done
388389 done
389390 # Edit the local package DB to reference the links directory.