diff --git a/pkgs/tools/security/cosign/default.nix b/pkgs/tools/security/cosign/default.nix index 344c74d573c3..f5f60f3da2a7 100644 --- a/pkgs/tools/security/cosign/default.nix +++ b/pkgs/tools/security/cosign/default.nix @@ -21,9 +21,8 @@ buildGoModule rec { excludedPackages = "\\(copasetic\\)"; - preBuild = '' - buildFlagsArray+=(${lib.optionalString pivKeySupport "-tags=pivkey"}) - ''; + tags = lib.optionals pivKeySupport [ "pivkey" ]; + ldflags = [ "-s" "-w" "-X github.com/sigstore/cosign/cmd/cosign/cli.gitVersion=v${version}" ]; meta = with lib; {