bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
aiohttp,
|
|
aresponses,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
syrupy,
|
|
yarl,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aiowaqi";
|
|
version = "3.1.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.11";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "joostlek";
|
|
repo = "python-waqi";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-YWTGEOSSkZ0XbZUE3k+Dn9qg8Pmwip9wCp8e/j1D9io=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "--cov" ""
|
|
'';
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
dependencies = [
|
|
aiohttp
|
|
yarl
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
aresponses
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
syrupy
|
|
];
|
|
|
|
pythonImportsCheck = [ "aiowaqi" ];
|
|
|
|
disabledTests = [
|
|
# Upstream mocking fails
|
|
"test_search"
|
|
];
|
|
|
|
pytestFlagsArray = [ "--snapshot-update" ];
|
|
|
|
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 ];
|
|
};
|
|
}
|