1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/pkgs/tools/misc/aptly/default.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

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