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

48 lines
1.2 KiB
Nix
Raw Normal View History

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