cloudfoundry-cli: use installShellFiles

This commit is contained in:
zowoq 2020-04-27 19:30:47 +10:00
parent b83b2591dd
commit 481c7bbd71

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub }:
{ stdenv, buildGoPackage, fetchFromGitHub, installShellFiles }:
buildGoPackage rec {
pname = "cloudfoundry-cli";
@ -15,6 +15,8 @@ buildGoPackage rec {
sha256 = "0dqrkimwhw016icgyf4cyipzy6vdz5jgickm33xxd9018dh3ibwq";
};
nativeBuildInputs = [ installShellFiles ];
makeTarget = let hps = stdenv.hostPlatform.system; in
if hps == "x86_64-darwin" then
"out/cf-cli_osx"
@ -33,7 +35,7 @@ buildGoPackage rec {
installPhase = ''
install -Dm555 out/cf "$bin/bin/cf"
install -Dm444 -t "$bin/share/bash-completion/completions/" "$src/ci/installers/completion/cf"
installShellCompletion --bash "$src/ci/installers/completion/cf"
'';
meta = with stdenv.lib; {