justStaticExecutables: enable -dead_strip on mac to shrink closure

gstqt5
michael bishop 2017-06-14 11:41:00 -03:00
parent 0032e55232
commit 24d313e203
No known key found for this signature in database
GPG Key ID: C294FC1A485A409A
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ rec {
isLibrary = false;
doHaddock = false;
postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc";
});
} // (if pkgs.stdenv.isDarwin then {
configureFlags = (drv.configureFlags or []) ++ ["--ghc-option=-optl=-dead_strip"];
} else {})
);
buildFromSdist = pkg: pkgs.lib.overrideDerivation pkg (drv: {
unpackPhase = let src = sdistTarball pkg; tarname = "${pkg.pname}-${pkg.version}"; in ''