ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / ap / aptly / package.nix
blob6da10fe9b7fce674e9fede1a4437b01d8e4e7108
1 { lib, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper, gnupg, bzip2, xz, graphviz, testers, aptly }:
3 buildGoModule rec {
4   pname = "aptly";
5   version = "1.5.0";
7   src = fetchFromGitHub {
8     owner = "aptly-dev";
9     repo = "aptly";
10     rev = "v${version}";
11     sha256 = "sha256-LqGOLXXaGfQfoj2r+aY9SdOKUDI9+22EsHKBhHMidyk=";
12   };
14   vendorHash = "sha256-6l3OFKFTtFWT68Ylav6woczBlMhD75C9ZoQ6OeLz0Cs=";
16   nativeBuildInputs = [ installShellFiles makeWrapper ];
18   ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
20   postInstall = ''
21     installShellCompletion --bash --name aptly completion.d/aptly
22     installShellCompletion --zsh --name _aptly completion.d/_aptly
23     wrapProgram "$out/bin/aptly" \
24       --prefix PATH ":" "${lib.makeBinPath [ gnupg bzip2 xz graphviz ]}"
25   '';
27   doCheck = false;
29   passthru.tests.version = testers.testVersion {
30     package = aptly;
31     command = "aptly version";
32   };
34   meta = with lib; {
35     homepage = "https://www.aptly.info";
36     description = "Debian repository management tool";
37     license = licenses.mit;
38     maintainers = with maintainers; [ montag451 ] ++ teams.bitnomial.members;
39     changelog =
40       "https://github.com/aptly-dev/aptly/releases/tag/v${version}";
41     mainProgram = "aptly";
42   };