From 815d6316ce16f0bcc2b1a3cb09952f995b147611 Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Tue, 11 Nov 2025 16:09:23 +0100 Subject: [PATCH] spire: build tpmdevid nodeattestor plugin --- pkgs/by-name/sp/spire/package.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/sp/spire/package.nix b/pkgs/by-name/sp/spire/package.nix index ac6d592ff42b..ef7020bf7c04 100644 --- a/pkgs/by-name/sp/spire/package.nix +++ b/pkgs/by-name/sp/spire/package.nix @@ -2,6 +2,7 @@ lib, buildGoModule, fetchFromGitHub, + openssl, }: buildGoModule (finalAttrs: { @@ -21,7 +22,11 @@ buildGoModule (finalAttrs: { sha256 = "sha256-iZMeD5ZwWKjY9mfuXgEgh+QLotmv28T8xBgpKoQTgxw="; }; - vendorHash = "sha256-tho3Qm9uHiiSNFmBZGZFgxhAKD4HKWsIUmiqkWlToQk="; + # Needed for github.co/google/go-tpm-tools/simulator which contains non-go files that `go mod vendor` strips + proxyVendor = true; + vendorHash = "sha256-nslLp/NjzsN1hSMMga67T6tMGLiqBNYQMt4Kjtwyvoc="; + + buildInputs = [ openssl ]; ldflags = [ "-s" @@ -34,12 +39,6 @@ buildGoModule (finalAttrs: { "cmd/spire-server" ]; - excludedPackages = [ - # ensure these files aren't evaluated, see preCheck - "test/tmpsimulator" - "pkg/agent/plugin/nodeattestor/tpmdevid" - ]; - __darwinAllowLocalNetworking = true; checkFlags = @@ -53,10 +52,6 @@ buildGoModule (finalAttrs: { [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; preCheck = '' - # remove test files which reference github.com/google/go-tpm-tools/simulator - # since it requires cgo and some missing header files - rm -rf test/tpmsimulator pkg/server/plugin/nodeattestor/tpmdevid/devid_test.go - # unset to run all tests unset subPackages '';