2020-04-28 14:44:22 +02:00
|
|
|
{ lib
|
2020-05-14 09:36:04 +02:00
|
|
|
, buildGoModule
|
2020-04-28 14:44:22 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2018-01-09 17:18:25 +01:00
|
|
|
|
2020-05-14 09:36:04 +02:00
|
|
|
buildGoModule rec {
|
2019-06-01 21:28:53 +02:00
|
|
|
pname = "cri-tools";
|
2021-08-06 07:06:13 +02:00
|
|
|
version = "1.22.0";
|
2020-04-28 14:44:22 +02:00
|
|
|
|
2019-06-01 21:30:03 +02:00
|
|
|
src = fetchFromGitHub {
|
2019-08-14 09:13:54 +02:00
|
|
|
owner = "kubernetes-sigs";
|
2019-06-01 21:30:03 +02:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-06 07:06:13 +02:00
|
|
|
sha256 = "sha256-+36lGLpNnTQnwwmXoVNPt3RMcnE46AdXOpghvhP0Bq0=";
|
2019-06-01 21:30:03 +02:00
|
|
|
};
|
2018-01-09 17:18:25 +01:00
|
|
|
|
2020-05-14 09:36:04 +02:00
|
|
|
vendorSha256 = null;
|
2018-01-09 17:18:25 +01:00
|
|
|
|
2020-08-04 02:26:27 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-28 14:44:22 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2019-08-14 09:13:54 +02:00
|
|
|
buildPhase = ''
|
2021-03-31 08:52:08 +02:00
|
|
|
runHook preBuild
|
2020-04-28 14:44:22 +02:00
|
|
|
make binaries VERSION=${version}
|
2021-03-31 08:52:08 +02:00
|
|
|
runHook postBuild
|
2020-04-28 14:44:22 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-03-31 08:52:08 +02:00
|
|
|
runHook preInstall
|
2020-04-28 14:44:22 +02: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-03-31 08:52:08 +02:00
|
|
|
runHook postInstall
|
2019-08-14 09:13:54 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2019-06-01 21:30:03 +02:00
|
|
|
description = "CLI and validation tools for Kubelet Container Runtime Interface (CRI)";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/kubernetes-sigs/cri-tools";
|
2020-04-28 14:44:22 +02:00
|
|
|
license = licenses.asl20;
|
2020-04-24 00:07:39 +02:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
2019-06-01 21:30:03 +02:00
|
|
|
};
|
|
|
|
}
|