Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 51 lines 1.1 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6 testers, 7 kapp, 8}: 9 10buildGoModule rec { 11 pname = "kapp"; 12 version = "0.64.2"; 13 14 src = fetchFromGitHub { 15 owner = "carvel-dev"; 16 repo = "kapp"; 17 rev = "v${version}"; 18 hash = "sha256-XIbKhJBGw+0TuRakZCBZ1d6MjNPpy252MgCDpPNEo3c="; 19 }; 20 21 vendorHash = null; 22 23 subPackages = [ "cmd/kapp" ]; 24 25 env.CGO_ENABLED = 0; 26 27 ldflags = [ 28 "-X carvel.dev/kapp/pkg/kapp/version.Version=${version}" 29 ]; 30 31 nativeBuildInputs = [ installShellFiles ]; 32 33 postInstall = '' 34 for shell in bash fish zsh; do 35 $out/bin/kapp completion $shell > kapp.$shell 36 installShellCompletion kapp.$shell 37 done 38 ''; 39 40 passthru.tests.version = testers.testVersion { 41 package = kapp; 42 }; 43 44 meta = with lib; { 45 description = "CLI tool that encourages Kubernetes users to manage bulk resources with an application abstraction for grouping"; 46 homepage = "https://carvel.dev/kapp/"; 47 license = licenses.asl20; 48 maintainers = with maintainers; [ brodes ]; 49 mainProgram = "kapp"; 50 }; 51}