2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-10-11 12:50:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
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
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyatmo";
|
2020-10-11 12:50:04 +00:00
|
|
|
version = "4.1.0";
|
|
|
|
disabled = pythonOlder "3.5"; # uses type hints
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jabesq";
|
|
|
|
repo = "netatmo-api-python";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0x3xq6ni9rl5k3vi0ydqafdzvza785ycnlgyikgqbkppbh3j33ig";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
propagatedBuildInputs = [ oauthlib requests requests_oauthlib ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
checkInputs = [
|
|
|
|
freezegun
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|