1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
54 lines
1.2 KiB
Nix
54 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
callPackage,
|
|
fetchFromGitHub,
|
|
# pytestCheckHook,
|
|
versionCheckHook,
|
|
|
|
hatchling,
|
|
packaging,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "homf";
|
|
version = "1.1.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "duckinator";
|
|
repo = "homf";
|
|
tag = "v${version}";
|
|
hash = "sha256-fDH6uJ2d/Jsnuudv+Qlv1tr3slxOJWh7b4smGS32n9A=";
|
|
};
|
|
|
|
build-system = [ hatchling ];
|
|
|
|
pythonRelaxDeps = [ "packaging" ];
|
|
dependencies = [ packaging ];
|
|
|
|
pythonImportsCheck = [
|
|
"homf"
|
|
"homf.api"
|
|
"homf.api.github"
|
|
"homf.api.pypi"
|
|
];
|
|
|
|
# There are currently no checks which do not require network access, which breaks the check hook somehow?
|
|
# nativeCheckInputs = [ pytestCheckHook ];
|
|
# disabledTestMarks = [ "network" ];
|
|
|
|
nativeBuildInputs = [ versionCheckHook ];
|
|
|
|
# (Ab)using `callPackage` as a fix-point operator, so tests can use the `homf` drv
|
|
passthru.tests = callPackage ./tests.nix { };
|
|
|
|
meta = {
|
|
description = "Asset download tool for GitHub Releases, PyPi, etc";
|
|
mainProgram = "homf";
|
|
homepage = "https://github.com/duckinator/homf";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ nicoo ];
|
|
};
|
|
}
|