1 { lib, fetchFromGitLab, python3Packages
2 , gitMinimal, rpm, dpkg, fakeroot
5 python3Packages.buildPythonApplication rec {
10 src = fetchFromGitLab {
11 domain = "gitlab.nic.cz";
15 hash = "sha256-VQNUzbWIDo/cbCdtx8JxN5UUMBW3mQ2B42In4b3AA+A=";
18 propagatedBuildInputs = with python3Packages; [
19 # copy&pasted requirements.txt (almost exactly)
20 beautifulsoup4 # upstream version detection
21 blessed # terminal colors
22 build # apkg distribution
23 cached-property # for python <= 3.7; but pip complains even with 3.8
24 click # nice CLI framework
25 distro # current distro detection
27 packaging # version parsing
28 requests # HTTP for humans™
32 nativeBuildInputs = with python3Packages; [ hatchling ];
34 makeWrapperArgs = [ # deps for `srcpkg` operation for other distros; could be optional
35 "--prefix" "PATH" ":" (lib.makeBinPath [ gitMinimal rpm dpkg fakeroot ])
38 nativeCheckInputs = with python3Packages; [ pytest dunamai ];
41 py.test # inspiration: .gitlab-ci.yml
46 description = "Upstream packaging automation tool";
47 homepage = "https://pkg.labs.nic.cz/pages/apkg";
48 license = licenses.gpl3Plus;
49 maintainers = [ maintainers.vcunat /* close to upstream */ ];