diff --git a/pkgs/development/tools/kubepug/default.nix b/pkgs/development/tools/kubepug/default.nix index 4795d35e7e6c..d14ba450103a 100644 --- a/pkgs/development/tools/kubepug/default.nix +++ b/pkgs/development/tools/kubepug/default.nix @@ -1,23 +1,25 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGo117Module, fetchFromGitHub }: -buildGoModule rec { +buildGo117Module rec { pname = "kubepug"; - version = "1.2.2"; + version = "1.3.2"; src = fetchFromGitHub { owner = "rikatz"; repo = "kubepug"; rev = "v${version}"; - sha256 = "sha256-jQ/LzwxYxfCKiu+2VhjQ3YWwLEqZkYrH7+olBOMUA1A="; + sha256 = "sha256-cjL718xTgtYev/lYL24vwZcB+joY3wIY4ixRCwAHQ4E="; }; - vendorSha256 = "sha256-P5HoU9AAGFrSrp9iymjW+r8w5L90KUOrmaXM8p+Wn44="; + vendorSha256 = "0hynxj3q4aa1gx3w4ak56z6j5iplxi2hzqzsjkgz20fy34nfd41s"; ldflags = [ "-s" "-w" "-X=github.com/rikatz/kubepug/version.Version=${src.rev}" ]; - subPackages = [ "cmd/kubepug.go" ]; + patches = [ + ./skip-external-network-tests.patch + ]; meta = with lib; { description = "Checks a Kubernetes cluster for objects using deprecated API versions"; diff --git a/pkgs/development/tools/kubepug/skip-external-network-tests.patch b/pkgs/development/tools/kubepug/skip-external-network-tests.patch new file mode 100644 index 000000000000..e24aa01ad175 --- /dev/null +++ b/pkgs/development/tools/kubepug/skip-external-network-tests.patch @@ -0,0 +1,12 @@ +diff --git a/pkg/utils/downloader_test.go b/pkg/utils/downloader_test.go +index b227760..b72dee9 100644 +--- a/pkg/utils/downloader_test.go ++++ b/pkg/utils/downloader_test.go +@@ -7,6 +7,7 @@ import ( + ) + + func TestDownloadSwaggerFile(t *testing.T) { ++ t.Skipf("Nix sandbox does not have networking") + var tmpdir string + // Github actions does not have a temporary dir :/ + tmpdir = os.Getenv("RUNNER_TEMP")