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`'
This commit is contained in:
Chuck 2019-12-13 14:08:56 -08:00 committed by Lassulus
parent fbfd77b158
commit 6498f468af

View file

@ -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;