2024-06-24 18:47:55 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aioresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatch-regex-commit,
|
|
|
|
hatchling,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dotenv,
|
|
|
|
pythonOlder,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyloadapi";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.4.0";
|
2024-06-24 18:47:55 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.12";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tr4nt0r";
|
|
|
|
repo = "pyloadapi";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-USSTXHHhtUc8QF9U3t3rARXn5Iqo6KOGBa3VAfRMbiQ=";
|
2024-06-24 18:47:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "--cov=src/pyloadapi/ --cov-report=term-missing" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
hatch-regex-commit
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [ aiohttp ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
aioresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
python-dotenv
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyloadapi" ];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require network access
|
|
|
|
"tests/test_cli.py"
|
|
|
|
];
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple wrapper for pyLoad's API";
|
|
|
|
homepage = "https://github.com/tr4nt0r/pyloadapi";
|
|
|
|
changelog = "https://github.com/tr4nt0r/pyloadapi/blob/${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|