2020-05-15 21:57:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "cri-tools";
|
2021-04-12 18:23:04 +00:00
|
|
|
version = "1.21.0";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kubernetes-sigs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-04-12 18:23:04 +00:00
|
|
|
sha256 = "sha256-chU7qNapmM4Gm8lYcdUreg1ZP93UM0LpIEk+w5cutlg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
vendorSha256 = null;
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preBuild
|
2020-05-15 21:57:56 +00:00
|
|
|
make binaries VERSION=${version}
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook postBuild
|
2020-05-15 21:57:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preInstall
|
2020-05-15 21:57:56 +00:00
|
|
|
make install BINDIR=$out/bin
|
|
|
|
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/crictl completion $shell > crictl.$shell
|
|
|
|
installShellCompletion crictl.$shell
|
|
|
|
done
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CLI and validation tools for Kubelet Container Runtime Interface (CRI)";
|
|
|
|
homepage = "https://github.com/kubernetes-sigs/cri-tools";
|
2020-05-15 21:57:56 +00:00
|
|
|
license = licenses.asl20;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
|
|
|
};
|
|
|
|
}
|