stern: Include bash & zsh completion support (#49668)
This commit is contained in:
parent
5294194fe2
commit
5087dcf247
@ -1,4 +1,4 @@
|
|||||||
{ lib, buildGoPackage, fetchFromGitHub }:
|
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "stern-${version}";
|
name = "stern-${version}";
|
||||||
@ -15,11 +15,20 @@ buildGoPackage rec {
|
|||||||
|
|
||||||
goDeps = ./deps.nix;
|
goDeps = ./deps.nix;
|
||||||
|
|
||||||
meta = with lib; {
|
# Only build shell completion if we're _not_ cross compiling,
|
||||||
description = "Multi pod and container log tailing for Kubernetes";
|
# because it requires executing the compiled stern binary.
|
||||||
homepage = "https://github.com/wercker/stern";
|
postInstall = lib.optionalString (stdenv.buildPlatform == stdenv.hostPlatform) ''
|
||||||
license = licenses.asl20;
|
mkdir -p $bin/share/bash-completion/completions
|
||||||
maintainers = with maintainers; [ mbode ];
|
$bin/bin/stern --completion bash > $bin/share/bash-completion/completions/stern
|
||||||
platforms = platforms.unix;
|
mkdir -p $bin/share/zsh/site-functions
|
||||||
};
|
$bin/bin/stern --completion zsh > $bin/share/zsh/site-functions/_stern
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Multi pod and container log tailing for Kubernetes";
|
||||||
|
homepage = "https://github.com/wercker/stern";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ mbode ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user