cri-tools: install completion
This commit is contained in:
parent
848a8c1b37
commit
f8d9d72f0e
@ -1,8 +1,13 @@
|
|||||||
{ buildGoPackage, fetchFromGitHub, lib }:
|
{ lib
|
||||||
|
, buildGoPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, installShellFiles
|
||||||
|
}:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "cri-tools";
|
pname = "cri-tools";
|
||||||
version = "1.18.0";
|
version = "1.18.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kubernetes-sigs";
|
owner = "kubernetes-sigs";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
@ -12,15 +17,26 @@ buildGoPackage rec {
|
|||||||
|
|
||||||
goPackagePath = "github.com/kubernetes-sigs/cri-tools";
|
goPackagePath = "github.com/kubernetes-sigs/cri-tools";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
pushd go/src/${goPackagePath}
|
pushd go/src/${goPackagePath}
|
||||||
make all install BINDIR=$out/bin
|
make binaries VERSION=${version}
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
make install BINDIR=$out/bin
|
||||||
|
|
||||||
|
for shell in bash fish zsh; do
|
||||||
|
$out/bin/crictl completion $shell > crictl.$shell
|
||||||
|
installShellCompletion crictl.$shell
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "CLI and validation tools for Kubelet Container Runtime Interface (CRI)";
|
description = "CLI and validation tools for Kubelet Container Runtime Interface (CRI)";
|
||||||
homepage = "https://github.com/kubernetes-sigs/cri-tools";
|
homepage = "https://github.com/kubernetes-sigs/cri-tools";
|
||||||
license = lib.licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user