From a2fff9333f555c0dc4983fa6269553ef88d11d5b Mon Sep 17 00:00:00 2001 From: Bryan Bennett Date: Sat, 23 Mar 2024 08:17:20 -0400 Subject: [PATCH] Strip and pack final binary --- default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/default.nix b/default.nix index 737856e..7b4b0a7 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,5 @@ { alcotest +, bintools , bisect_ppx , buildDunePackage , core @@ -13,6 +14,7 @@ , re , reason , sha +, upx , }: buildDunePackage { @@ -39,6 +41,8 @@ buildDunePackage { substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env" ''; 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 ''; buildInputs = [