2021-02-16 17:04:54 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
2021-05-28 09:39:13 +00:00
|
|
|
, pytest-aiohttp
|
2021-02-16 17:04:54 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-engineio
|
|
|
|
, python-socketio
|
|
|
|
, pythonOlder
|
|
|
|
, websockets
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioambient";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "2023.10.1";
|
2021-02-16 17:04:54 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bachya";
|
|
|
|
repo = pname;
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-Q7jb0tJsbVM2vEqKgjXOWJN2OwR9qLchU/4ShOUGPT4=";
|
2021-02-16 17:04:54 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2023-04-12 12:48:02 +00:00
|
|
|
--replace 'websockets = ">=11.0.1"' 'websockets = "*"'
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
python-engineio
|
|
|
|
python-socketio
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-02-16 17:04:54 +00:00
|
|
|
aresponses
|
2021-05-28 09:39:13 +00:00
|
|
|
pytest-aiohttp
|
2021-02-16 17:04:54 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# Ignore the examples directory as the files are prefixed with test_
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"examples/"
|
|
|
|
];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioambient"
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for the Ambient Weather API";
|
|
|
|
homepage = "https://github.com/bachya/aioambient";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/bachya/aioambient/releases/tag/${version}";
|
2021-02-16 17:04:54 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|