2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
ciso8601,
|
|
|
|
fetchFromGitHub,
|
|
|
|
orjson,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2022-02-20 05:27:41 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiopyarr";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "23.4.0";
|
2022-02-20 05:27:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tkdrob";
|
|
|
|
repo = pname;
|
2023-04-12 12:48:02 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-CzNB6ymvDTktiOGdcdCvWLVQ3mKmbdMpc/vezSXCpG4=";
|
2022-02-20 05:27:41 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace 'version="master"' 'version="${version}"'
|
|
|
|
'';
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-11-04 12:27:35 +00:00
|
|
|
ciso8601
|
|
|
|
orjson
|
2022-02-20 05:27:41 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiopyarr" ];
|
2022-02-20 05:27:41 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API client for Lidarr/Radarr/Readarr/Sonarr";
|
|
|
|
homepage = "https://github.com/tkdrob/aiopyarr";
|
2023-04-12 12:48:02 +00:00
|
|
|
changelog = "https://github.com/tkdrob/aiopyarr/releases/tag/${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|