10 , pkcs11Support ? true
18 src = fetchFromGitHub {
22 hash = "sha256-+UZ1o9rkbk/RnyU2Vzzs7uIm+texl5kGa+qt88x4zuk=";
26 lib.optional (stdenv.hostPlatform.isLinux && pivKeySupport) (lib.getDev pcsclite)
27 ++ lib.optionals (stdenv.hostPlatform.isDarwin && pivKeySupport) [ PCSC ];
29 nativeBuildInputs = [ pkg-config installShellFiles ];
31 vendorHash = "sha256-E1QHLh2gg5RZ7+tl7eJNR2FmtfVI6rwI6qLD7tio18c=";
37 tags = [ ] ++ lib.optionals pivKeySupport [ "pivkey" ] ++ lib.optionals pkcs11Support [ "pkcs11key" ];
42 "-X sigs.k8s.io/release-utils/version.gitVersion=v${version}"
43 "-X sigs.k8s.io/release-utils/version.gitTreeState=clean"
46 __darwinAllowLocalNetworking = true;
52 rm pkg/cosign/ctlog_test.go # Require network access
53 rm pkg/cosign/tlog_test.go # Require network access
54 rm cmd/cosign/cli/verify/verify_test.go # Require network access
55 rm cmd/cosign/cli/verify/verify_blob_attestation_test.go # Require network access
56 rm cmd/cosign/cli/verify/verify_blob_test.go # Require network access
59 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
60 installShellCompletion --cmd cosign \
61 --bash <($out/bin/cosign completion bash) \
62 --fish <($out/bin/cosign completion fish) \
63 --zsh <($out/bin/cosign completion zsh)
66 passthru.tests.version = testers.testVersion {
68 command = "cosign version";
69 version = "v${version}";
73 homepage = "https://github.com/sigstore/cosign";
74 changelog = "https://github.com/sigstore/cosign/releases/tag/v${version}";
75 description = "Container Signing CLI with support for ephemeral keys and Sigstore signing";
76 mainProgram = "cosign";
77 license = licenses.asl20;
78 maintainers = with maintainers; [ lesuisse jk developer-guy ];