diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-01-17 10:14:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 10:14:45 +0100 |
commit | 008ddef4b08e9bee530a5a4c597c88b344089021 (patch) | |
tree | ea246cd496c9fd7d3c7a7d09e02786374d7ebf09 | |
parent | bb24d1edd7c0d0c47a85b39c0c2c2b3093e897b6 (diff) | |
parent | dd3aa1e5158f5692326f282985ec03300ed452b2 (diff) |
Merge pull request #5915 from NixOS/disallow-boost-reference
Forbid runtime references to boost
-rw-r--r-- | flake.nix | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -299,6 +299,8 @@ propagatedBuildInputs = propagatedDeps; + disallowedReferences = [ boost ]; + preConfigure = '' # Copy libboost_context so we don't get all of Boost in our closure. @@ -310,6 +312,13 @@ chmod u+w $out/lib/*.so.* patchelf --set-rpath $out/lib:${currentStdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.* ''} + ${lib.optionalString currentStdenv.isDarwin '' + for LIB in $out/lib/*.dylib; do + chmod u+w $LIB + install_name_tool -id $LIB $LIB + done + install_name_tool -change ${boost}/lib/libboost_system.dylib $out/lib/libboost_system.dylib $out/lib/libboost_thread.dylib + ''} ''; configureFlags = configureFlags ++ @@ -326,6 +335,12 @@ postInstall = '' mkdir -p $doc/nix-support echo "doc manual $doc/share/doc/nix/manual" >> $doc/nix-support/hydra-build-products + ${lib.optionalString currentStdenv.isDarwin '' + install_name_tool \ + -change ${boost}/lib/libboost_context.dylib \ + $out/lib/libboost_context.dylib \ + $out/lib/libnixutil.dylib + ''} ''; doInstallCheck = true; |