{ buildGoModule, fetchFromGitHub, lib, installShellFiles }: buildGoModule rec { pname = "tanka"; version = "0.29.0"; src = fetchFromGitHub { owner = "grafana"; repo = pname; rev = "v${version}"; sha256 = "sha256-Z4lIZi8KVHcusyXZikWX9qvcbK7Wr7M/y7/j80AKN6Q="; }; vendorHash = "sha256-sNSih6Ss70/Va2UKDTMLqT6WUelcDUTvj85LSPXYCoM="; doCheck = false; # Required for versions >= 0.28 as they introduce a gowork.sum file. This is only used for tests so we can safely disable GOWORK env.GOWORK = "off"; subPackages = [ "cmd/tk" ]; ldflags = [ "-s" "-w" "-extldflags '-static'" "-X github.com/grafana/tanka/pkg/tanka.CurrentVersion=v${version}" ]; nativeBuildInputs = [ installShellFiles ]; postInstall = '' echo "complete -C $out/bin/tk tk" > tk.bash cat >tk.fish <tk.zsh <