2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
syrupy,
|
|
|
|
yarl,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiowaqi";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "3.1.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "joostlek";
|
|
|
|
repo = "python-waqi";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-YWTGEOSSkZ0XbZUE3k+Dn9qg8Pmwip9wCp8e/j1D9io=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail "--cov" ""
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [ poetry-core ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = [
|
2023-10-09 19:29:22 +00:00
|
|
|
aiohttp
|
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
syrupy
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiowaqi" ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Upstream mocking fails
|
|
|
|
"test_search"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--snapshot-update" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to interact with the WAQI API";
|
|
|
|
homepage = "https://github.com/joostlek/python-waqi";
|
|
|
|
changelog = "https://github.com/joostlek/python-waqi/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|