After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev b32a0943687d2a5094a6d92f25a4b6e16a76b5b7
result/bin/apply-formatting $NIXPKGS_PATH
73 lines
1.6 KiB
Nix
73 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitLab,
|
|
python3Packages,
|
|
gitMinimal,
|
|
rpm,
|
|
dpkg,
|
|
fakeroot,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "apkg";
|
|
version = "0.5.0";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitLab {
|
|
domain = "gitlab.nic.cz";
|
|
owner = "packaging";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-VQNUzbWIDo/cbCdtx8JxN5UUMBW3mQ2B42In4b3AA+A=";
|
|
};
|
|
|
|
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; [ hatchling ];
|
|
|
|
makeWrapperArgs = [
|
|
# deps for `srcpkg` operation for other distros; could be optional
|
|
"--prefix"
|
|
"PATH"
|
|
":"
|
|
(lib.makeBinPath [
|
|
gitMinimal
|
|
rpm
|
|
dpkg
|
|
fakeroot
|
|
])
|
|
];
|
|
|
|
nativeCheckInputs = with python3Packages; [
|
|
pytest
|
|
dunamai
|
|
];
|
|
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";
|
|
};
|
|
}
|