forked from mirrors/nixpkgs
aptly: add bash completion
This commit is contained in:
parent
ff15333fe4
commit
b871a208e5
|
@ -1,17 +1,31 @@
|
|||
{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, gnupg1compat, bzip2, xz, graphviz }:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "aptly-${version}";
|
||||
let
|
||||
|
||||
version = "0.9.7";
|
||||
rev = "v${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
aptlySrc = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "smira";
|
||||
repo = "aptly";
|
||||
sha256 = "0j1bmqdah4i83r2cf8zcq87aif1qg90yasgf82yygk3hj0gw1h00";
|
||||
};
|
||||
|
||||
aptlyCompletionSrc = fetchFromGitHub {
|
||||
rev = version;
|
||||
owner = "aptly-dev";
|
||||
repo = "aptly-bash-completion";
|
||||
sha256 = "1yz3pr2jfczqv81as2q3cizwywj5ksw76vi15xlbx5njkjp4rbm4";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
buildGoPackage {
|
||||
name = "aptly-${version}";
|
||||
|
||||
src = aptlySrc;
|
||||
|
||||
goPackagePath = "github.com/smira/aptly";
|
||||
goDeps = ./deps.nix;
|
||||
|
||||
|
@ -19,6 +33,8 @@ buildGoPackage rec {
|
|||
|
||||
postInstall = ''
|
||||
rm $bin/bin/man
|
||||
mkdir -p $bin/share/bash-completion/completions
|
||||
ln -s ${aptlyCompletionSrc}/aptly $bin/share/bash-completion/completions
|
||||
wrapProgram "$bin/bin/aptly" \
|
||||
--prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg1compat bzip2 xz graphviz ]}"
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue