From 7d9626db39eae93aa36aa41f58c924866346d3e1 Mon Sep 17 00:00:00 2001 From: Cottand Date: Mon, 30 Sep 2024 00:57:31 +0100 Subject: [PATCH] only upx on linux --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index da7d186..de4292f 100644 --- a/flake.nix +++ b/flake.nix @@ -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" then "" else '' cd $out/bin ${pkgs.upx}/bin/upx -9 -o leng.mini leng rm leng