2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-10-11 12:50:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
2021-06-28 23:13:55 +00:00
|
|
|
, aiohttp
|
2020-06-15 15:56:04 +00:00
|
|
|
, oauthlib
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
2020-06-15 15:56:04 +00:00
|
|
|
, requests_oauthlib
|
2020-10-11 12:50:04 +00:00
|
|
|
, freezegun
|
2021-06-28 23:13:55 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-mock
|
2020-10-11 12:50:04 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, requests-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatmo";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "5.1.0";
|
2020-11-06 00:33:48 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
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";
|
2020-10-11 12:50:04 +00:00
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "0szk3wjcrllzvpix66iq3li54pw0c1knlx8wn1z9kqhkrb8r200x";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
2021-02-05 17:12:51 +00:00
|
|
|
--replace "oauthlib~=3.1" "oauthlib" \
|
|
|
|
--replace "requests~=2.24" "requests"
|
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
|
|
|
|
requests_oauthlib
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
checkInputs = [
|
|
|
|
freezegun
|
2021-06-28 23:13:55 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-mock
|
2020-10-11 12:50:04 +00:00
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyatmo" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple API to access Netatmo weather station data";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://github.com/jabesq/netatmo-api-python";
|
|
|
|
maintainers = with maintainers; [ delroth ];
|
|
|
|
};
|
|
|
|
}
|