aptly: use installShellFiles

This commit is contained in:
zowoq 2020-04-27 10:10:26 +10:00
parent bd6b2318c3
commit b83b2591dd

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, gnupg, bzip2, xz, graphviz }: { stdenv, buildGoPackage, fetchFromGitHub, installShellFiles, makeWrapper, gnupg, bzip2, xz, graphviz }:
let let
@ -29,11 +29,10 @@ buildGoPackage {
goPackagePath = "github.com/aptly-dev/aptly"; goPackagePath = "github.com/aptly-dev/aptly";
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ installShellFiles makeWrapper ];
postInstall = '' postInstall = ''
mkdir -p $bin/share/bash-completion/completions installShellCompletion --bash ${aptlyCompletionSrc}/aptly
ln -s ${aptlyCompletionSrc}/aptly $bin/share/bash-completion/completions
wrapProgram "$bin/bin/aptly" \ wrapProgram "$bin/bin/aptly" \
--prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg bzip2 xz graphviz ]}" --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg bzip2 xz graphviz ]}"
''; '';