nixpkgs-suyu/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 02:01:37 +01:00
2016-12-10 17:27:55 +01:00
let
2019-02-20 13:11:53 +01:00
version = "1.3.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;
2019-02-20 13:11:53 +01:00
owner = "aptly-dev";
2016-11-21 02:01:37 +01:00
repo = "aptly";
2019-02-20 13:11:53 +01:00
sha256 = "032gw8qkxcgc0jyrvzqh7jkbmk4k0gf7j74hyhclfnjmd9548f5l";
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;
2019-02-20 13:11:53 +01:00
goPackagePath = "github.com/aptly-dev/aptly";
2016-11-21 02:01:37 +01:00
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 [ gnupg 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.unix;
2016-11-21 02:01:37 +01:00
maintainers = [ maintainers.montag451 ];
};
}