Files
nixpkgs/pkgs/by-name/ap/apkg/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

74 lines
1.6 KiB
Nix

{
lib,
fetchFromGitLab,
python3Packages,
gitMinimal,
rpm,
dpkg,
fakeroot,
}:
python3Packages.buildPythonApplication rec {
pname = "apkg";
version = "0.6.1";
format = "pyproject";
src = fetchFromGitLab {
domain = "gitlab.nic.cz";
owner = "packaging";
repo = "apkg";
tag = "v${version}";
hash = "sha256-rFcHgNaZBTKO0tU7O8fz2eOD731sLHWxhh0x5mMo9uw=";
};
propagatedBuildInputs = with python3Packages; [
# copy&pasted requirements.txt (almost exactly)
beautifulsoup4 # upstream version detection
blessed # terminal colors
build # apkg distribution
cached-property # for python <= 3.7; but pip complains even with 3.8
click # nice CLI framework
distro # current distro detection
jinja2 # templating
packaging # version parsing
requests # HTTP for humans™
toml # config files
];
nativeBuildInputs = with python3Packages; [
setuptools # required for build
];
makeWrapperArgs = [
# deps for `srcpkg` operation for other distros; could be optional
"--prefix"
"PATH"
":"
(lib.makeBinPath [
gitMinimal
rpm
dpkg
fakeroot
])
];
nativeCheckInputs = with python3Packages; [
pytest
];
checkPhase = ''
runHook preCheck
py.test # inspiration: .gitlab-ci.yml
runHook postCheck
'';
meta = with lib; {
description = "Upstream packaging automation tool";
homepage = "https://pkg.labs.nic.cz/pages/apkg";
license = licenses.gpl3Plus;
maintainers = [
maintainers.vcunat # close to upstream
];
mainProgram = "apkg";
};
}