Strip and pack final binary

This commit is contained in:
Bryan Bennett 2024-03-23 08:17:20 -04:00
parent 358ae864fc
commit a2fff9333f
No known key found for this signature in database
GPG key ID: EE149E4215408DE9

View file

@ -1,4 +1,5 @@
{ alcotest { alcotest
, bintools
, bisect_ppx , bisect_ppx
, buildDunePackage , buildDunePackage
, core , core
@ -13,6 +14,7 @@
, re , re
, reason , reason
, sha , sha
, upx
, ,
}: }:
buildDunePackage { buildDunePackage {
@ -39,6 +41,8 @@ buildDunePackage {
substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env" substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env"
''; '';
postInstall = '' postInstall = ''
${bintools}/bin/strip --strip-unneeded $out/bin/flake_env
${upx}/bin/upx $out/bin/flake_env
install -m400 -D direnvrc $out/share/flake_env/direnvrc install -m400 -D direnvrc $out/share/flake_env/direnvrc
''; '';
buildInputs = [ buildInputs = [