doctl: install shell completion
This commit is contained in:
parent
e6d4b95fed
commit
dcbe2aa300
@ -1,4 +1,4 @@
|
|||||||
{ lib, buildGoPackage, fetchFromGitHub }:
|
{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
pname = "doctl";
|
pname = "doctl";
|
||||||
@ -16,6 +16,16 @@ buildGoPackage rec {
|
|||||||
-X ${goPackagePath}.Label=release
|
-X ${goPackagePath}.Label=release
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
export HOME=$(mktemp -d) # attempts to write to /homeless-shelter
|
||||||
|
for shell in bash fish zsh; do
|
||||||
|
$bin/bin/doctl completion $shell > doctl.$shell
|
||||||
|
installShellCompletion doctl.$shell
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "digitalocean";
|
owner = "digitalocean";
|
||||||
repo = "doctl";
|
repo = "doctl";
|
||||||
|
Loading…
Reference in New Issue
Block a user