Merge #182362: apkg: init at 0.4.0

This commit is contained in:
Vladimír Čunát 2022-07-28 22:36:02 +02:00
commit 0febba1d8a
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,49 @@
{ lib, fetchFromGitLab, python3Packages
, gitMinimal, rpm, dpkg, fakeroot
}:
python3Packages.buildPythonApplication rec {
pname = "apkg";
version = "0.4.0";
src = fetchFromGitLab {
domain = "gitlab.nic.cz";
owner = "packaging";
repo = pname;
rev = "v${version}";
sha256 = "duZz2Kwjgek5pMJTDH8gMZAZ13uFwaIYT5E1brW7I7U=";
};
propagatedBuildInputs = with python3Packages; [
# copy&pasted requirements.txt (almost exactly)
beautifulsoup4 # upstream version detection
blessings # terminal colors
build # apkg distribution
cached-property # @cached_property for python <= 3.7
click # nice CLI framework
distro # current distro detection
jinja2 # templating
packaging # version parsing
requests # HTTP for humans™
setuptools # required by minver
toml # config files
];
makeWrapperArgs = [ # deps for `srcpkg` operation for other distros; could be optional
"--prefix" "PATH" ":" (lib.makeBinPath [ gitMinimal rpm dpkg fakeroot ])
];
checkInputs = 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 */ ];
};
}

View file

@ -15244,6 +15244,8 @@ with pkgs;
anybadge = with python3Packages; toPythonApplication anybadge;
apkg = callPackage ../tools/package-management/apkg { };
augeas = callPackage ../tools/system/augeas { };
autoadb = callPackage ../misc/autoadb { };