parca-agent: 0.35.2 -> 0.36.0 (#378749)
[NixPkgs.git] / pkgs / by-name / cr / cri-tools / package.nix
blobc0da20906e8668fa437fd6bba5f01a47b1989bcd
2   lib,
3   stdenv,
4   buildGoModule,
5   fetchFromGitHub,
6   installShellFiles,
7 }:
9 buildGoModule rec {
10   pname = "cri-tools";
11   version = "1.32.0";
13   src = fetchFromGitHub {
14     owner = "kubernetes-sigs";
15     repo = pname;
16     rev = "v${version}";
17     hash = "sha256-wdtsx5DIg+65VRRUPai5d8Tk/zQ4MhVjXNFKK4NCBFs=";
18   };
20   vendorHash = null;
22   doCheck = false;
24   nativeBuildInputs = [ installShellFiles ];
26   buildPhase = ''
27     runHook preBuild
28     make binaries VERSION=${version}
29     runHook postBuild
30   '';
32   installPhase =
33     ''
34       runHook preInstall
35       make install BINDIR=$out/bin
36     ''
37     + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
38       for shell in bash fish zsh; do
39         installShellCompletion --cmd crictl \
40           --$shell <($out/bin/crictl completion $shell)
41       done
42     ''
43     + ''
44       runHook postInstall
45     '';
47   meta = with lib; {
48     description = "CLI and validation tools for Kubelet Container Runtime Interface (CRI)";
49     homepage = "https://github.com/kubernetes-sigs/cri-tools";
50     license = licenses.asl20;
51     maintainers = with maintainers; [ ] ++ teams.podman.members;
52   };