nixpkgs/pkgs/by-name/ap/aptly/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

44 lines
1.2 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles, makeWrapper, gnupg, bzip2, xz, graphviz, testers, aptly }:
buildGoModule rec {
pname = "aptly";
version = "1.5.0";
src = fetchFromGitHub {
owner = "aptly-dev";
repo = "aptly";
rev = "v${version}";
sha256 = "sha256-LqGOLXXaGfQfoj2r+aY9SdOKUDI9+22EsHKBhHMidyk=";
};
vendorHash = "sha256-6l3OFKFTtFWT68Ylav6woczBlMhD75C9ZoQ6OeLz0Cs=";
nativeBuildInputs = [ installShellFiles makeWrapper ];
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
postInstall = ''
installShellCompletion --bash --name aptly completion.d/aptly
installShellCompletion --zsh --name _aptly completion.d/_aptly
wrapProgram "$out/bin/aptly" \
--prefix PATH ":" "${lib.makeBinPath [ gnupg bzip2 xz graphviz ]}"
'';
doCheck = false;
passthru.tests.version = testers.testVersion {
package = aptly;
command = "aptly version";
};
meta = with lib; {
homepage = "https://www.aptly.info";
description = "Debian repository management tool";
license = licenses.mit;
maintainers = with maintainers; [ montag451 ] ++ teams.bitnomial.members;
changelog =
"https://github.com/aptly-dev/aptly/releases/tag/v${version}";
mainProgram = "aptly";
};
}