justStaticExecutables: enable -dead_strip on mac to shrink closure

This commit is contained in:
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

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 ''