diff options
author | Chuck <chuck@intelligence.org> | 2019-12-13 14:08:56 -0800 |
---|---|---|
committer | Lassulus <github@lassul.us> | 2019-12-14 09:32:34 +0100 |
commit | 6498f468afc29293cc602e29fe5448cfd046d657 (patch) | |
tree | 554b18bafacf6e019c9e83fcc4515897c6e552e1 /pkgs/build-support | |
parent | fbfd77b158c896cccff1cba7181e83533b35fe14 (diff) | |
download | nixpkgs-6498f468afc29293cc602e29fe5448cfd046d657.tar nixpkgs-6498f468afc29293cc602e29fe5448cfd046d657.tar.gz nixpkgs-6498f468afc29293cc602e29fe5448cfd046d657.tar.bz2 nixpkgs-6498f468afc29293cc602e29fe5448cfd046d657.tar.lz nixpkgs-6498f468afc29293cc602e29fe5448cfd046d657.tar.xz nixpkgs-6498f468afc29293cc602e29fe5448cfd046d657.tar.zst nixpkgs-6498f468afc29293cc602e29fe5448cfd046d657.zip |
WriteHaskell: Strip binaries
This reduces the size of Hello World [1] from 3.06 MiB to 678 KiB. [1] As measured by nix-shell -p 'writers.writeHaskellBin "hello" {} "main = putStrLn \"hello\""' --run 'ls -l `which hello`'
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/writers/default.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index 2cd4f1af022..b90c6490e4a 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -148,6 +148,7 @@ rec { cp $contentPath tmp.hs ${ghc.withPackages (_: libraries )}/bin/ghc tmp.hs mv tmp $out + ${pkgs.binutils-unwrapped}/bin/strip --strip-unneeded "$out" ''; } name; |