diff --git a/pkgs/development/tools/ko/default.nix b/pkgs/development/tools/ko/default.nix index 614b5d4c9df4..ab206a090bb1 100644 --- a/pkgs/development/tools/ko/default.nix +++ b/pkgs/development/tools/ko/default.nix @@ -7,23 +7,32 @@ buildGoModule rec { pname = "ko"; - version = "0.8.3"; + version = "0.9.3"; src = fetchFromGitHub { owner = "google"; repo = pname; rev = "v${version}"; - sha256 = "sha256-LoOXZY4uF7GSS3Dh/ozCsLJTxgmPmZZuEisJ4ShjCBc="; + sha256 = "sha256-cIrlhhk5Lt0Qt7q7rKw8EXrJqZWZEjrEUyHOvHiT6bs="; }; vendorSha256 = null; - # Don't build the legacy main.go or test dir - excludedPackages = "\\(cmd/ko\\|test\\)"; + nativeBuildInputs = [ installShellFiles ]; + # Pin so that we don't build the several other development tools + subPackages = "."; + ldflags = [ "-s" "-w" "-X github.com/google/ko/pkg/commands.Version=${version}" ]; checkInputs = [ git ]; preCheck = '' + # Feed in all the tests for testing + # This is because subPackages above limits what is built to just what we + # want but also limits the tests + getGoDirs() { + go list ./... + } + # resolves some complaints from ko export GOROOT="$(go env GOROOT)" git init