12 src = fetchFromGitHub {
15 rev = "refs/tags/v${version}";
16 hash = "sha256-BEKsa5mzJplcyR65/4T0MizrYxEk8/ON8SDFt8ZxqMU=";
21 nativeBuildInputs = [ installShellFiles ];
23 # Pin so that we don't build the several other development tools
26 ldflags = [ "-s" "-w" "-X github.com/google/ko/pkg/commands.Version=${version}" ];
29 # requires docker daemon
30 "-skip=TestNewPublisherCanPublish"
33 nativeCheckInputs = [ git ];
35 # Feed in all the tests for testing
36 # This is because subPackages above limits what is built to just what we
37 # want but also limits the tests
42 # resolves some complaints from ko
43 export GOROOT="$(go env GOROOT)"
46 # ko tests will fail if any of those env are set, as ko tries
47 # to make sure it can build and target multiple GOOS/GOARCH
48 unset GOOS GOARCH GOARM
52 installShellCompletion --cmd ko \
53 --bash <($out/bin/ko completion bash) \
54 --fish <($out/bin/ko completion fish) \
55 --zsh <($out/bin/ko completion zsh)
59 homepage = "https://github.com/ko-build/ko";
60 changelog = "https://github.com/ko-build/ko/releases/tag/v${version}";
61 description = "Build and deploy Go applications on Kubernetes";
63 ko is a simple, fast container image builder for Go applications.
64 It's ideal for use cases where your image contains a single Go application without any/many dependencies on the OS base image (e.g. no cgo, no OS package dependencies).
65 ko builds images by effectively executing go build on your local machine, and as such doesn't require docker to be installed. This can make it a good fit for lightweight CI/CD use cases.
66 ko also includes support for simple YAML templating which makes it a powerful tool for Kubernetes applications.
68 license = licenses.asl20;
69 maintainers = with maintainers; [ nickcao jk vdemeester developer-guy ];