Skip to content

Commit

Permalink
only upx on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
cottand committed Sep 30, 2024
1 parent 1aabb36 commit f13eb97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
pname = "leng";
version = "1.6.0";
src = nixpkgs.lib.sources.cleanSource ./.;
ldflags = [ "-s -w " ];
postInstall = ''
ldflags = [ "-s -w" ];
CGO_ENABLED = "0";
# upx does not support darwin
postInstall = if pkgs.lib.strings.hasSuffix "darwin" system then "" else ''
cd $out/bin
${pkgs.upx}/bin/upx -9 -o leng.mini leng
rm leng
Expand Down

0 comments on commit f13eb97

Please sign in to comment.