nixUnstable: Include a copy of libboost_context

This shaves 47 MiB off the closure size. (libboost_context.so is only
19 KiB.)
This commit is contained in:
Eelco Dolstra 2018-08-22 13:21:05 +02:00
parent c26c7f931a
commit 4c6aa54f86
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE

View File

@ -49,6 +49,15 @@ let
# Seems to be required when using std::atomic with 64-bit types
NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.system == "armv6l-linux") "-latomic";
preConfigure =
# Copy libboost_context so we don't get all of Boost in our closure.
# https://github.com/NixOS/nixpkgs/issues/45462
lib.optionalString fromGit
''
mkdir -p $out/lib
cp ${boost}/lib/libboost_context* $out/lib
'';
configureFlags =
[ "--with-store-dir=${storeDir}"
"--localstatedir=${stateDir}"