2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
oauthlib,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-oauthlib,
|
|
|
|
requests-mock,
|
|
|
|
setuptools-scm,
|
|
|
|
time-machine,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatmo";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "8.0.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2021-10-07 14:46:35 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jabesq";
|
2021-02-05 17:12:51 +00:00
|
|
|
repo = "pyatmo";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-FnDXj+bY/TMdengnxgludXUTiZw9wpeFiNbWTIxrlzw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "oauthlib~=3.1" "oauthlib" \
|
|
|
|
--replace "requests~=2.24" "requests"
|
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
pythonRelaxDeps = [ "requests-oauthlib" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-11-06 00:33:48 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
aiohttp
|
2020-11-06 00:33:48 +00:00
|
|
|
oauthlib
|
|
|
|
requests
|
2022-04-27 09:35:20 +00:00
|
|
|
requests-oauthlib
|
2020-11-06 00:33:48 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2020-10-11 12:50:04 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
2022-08-12 12:06:08 +00:00
|
|
|
time-machine
|
2020-10-11 12:50:04 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "pyatmo" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple API to access Netatmo weather station data";
|
2021-10-07 14:46:35 +00:00
|
|
|
homepage = "https://github.com/jabesq/pyatmo";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/jabesq/pyatmo/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|