nixpkgs/pkgs/tools/misc/aptly/default.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper, gnupg1compat, bzip2, xz, graphviz }:
2016-11-21 02:01:37 +01:00
2016-12-10 17:27:55 +01:00
let
version = "1.2.0";
2016-11-21 02:01:37 +01:00
rev = "v${version}";
2016-12-10 17:27:55 +01:00
aptlySrc = fetchFromGitHub {
2016-11-21 02:01:37 +01:00
inherit rev;
owner = "smira";
repo = "aptly";
sha256 = "1acnkmgarz9rp0skkh7zzwkhisjlmbl74jqjmqd3mn42y528c34b";
2016-11-21 02:01:37 +01:00
};
2016-12-10 17:27:55 +01:00
aptlyCompletionSrc = fetchFromGitHub {
2017-09-05 13:04:05 +02:00
rev = "1.0.1";
2016-12-10 17:27:55 +01:00
owner = "aptly-dev";
repo = "aptly-bash-completion";
2017-06-20 05:06:03 +02:00
sha256 = "0dkc4z687yk912lpv8rirv0nby7iny1zgdvnhdm5b47qmjr1sm5q";
2016-12-10 17:27:55 +01:00
};
in
buildGoPackage {
name = "aptly-${version}";
src = aptlySrc;
2016-11-21 02:01:37 +01:00
goPackagePath = "github.com/smira/aptly";
nativeBuildInputs = [ makeWrapper ];
2016-11-21 02:01:37 +01:00
postInstall = ''
2016-12-10 17:27:55 +01:00
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 ]}"
2016-11-21 02:01:37 +01:00
'';
meta = with stdenv.lib; {
homepage = https://www.aptly.info;
description = "Debian repository management tool";
license = licenses.mit;
platforms = platforms.linux;
maintainers = [ maintainers.montag451 ];
};
}