mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 11:20:10 +00:00
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
(cherry picked from commit a9373cdb0a)
This commit is contained in:
@@ -385,7 +385,8 @@ stdenv.mkDerivation ({
|
||||
|
||||
for d in $(grep '^dynamic-library-dirs:' "$packageConfDir"/* | cut -d' ' -f2- | tr ' ' '\n' | sort -u); do
|
||||
for lib in "$d/"*.dylib; do
|
||||
ln -s "$lib" "$dynamicLinksDir"
|
||||
# Allow overwriting because C libs can be pulled in multiple times.
|
||||
ln -sf "$lib" "$dynamicLinksDir"
|
||||
done
|
||||
done
|
||||
# Edit the local package DB to reference the links directory.
|
||||
|
||||
Reference in New Issue
Block a user