about summary refs log tree commit diff
path: root/release.nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-08-27T20·38+0200
committerEelco Dolstra <edolstra@gmail.com>2019-08-27T20·38+0200
commit5fa8b3f96577db65e080aaef65ad1cae462356cc (patch)
treeacd4f0609f31bc207678bde7067212d97b7fc7ac /release.nix
parentceefddafe839a0c9ac553367e16f965dda7fb086 (diff)
Update the libboost hack
This cuts about 46 MiB from the closure.
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/release.nix b/release.nix
index bec95573083b..ab677f3bd466 100644
--- a/release.nix
+++ b/release.nix
@@ -72,7 +72,12 @@ let
           # https://github.com/NixOS/nixpkgs/issues/45462
           ''
             mkdir -p $out/lib
-            cp ${boost}/lib/libboost_context* $out/lib
+            cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
+            rm -f $out/lib/*.a
+            chmod u+w $out/lib/*.so.*
+            ${lib.optionalString stdenv.isLinux ''
+              patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
+            ''}
           '';
 
         configureFlags = configureFlags ++