nixpkgs/pkgs/development/python-modules/pyatmo/default.nix

56 lines
1.0 KiB
Nix
Raw Normal View History

2019-05-04 21:43:49 +00:00
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
2021-06-02 23:45:39 +00:00
, aiohttp
, oauthlib
, requests
, requests_oauthlib
, freezegun
2021-06-02 23:45:39 +00:00
, pytest-asyncio
, pytestCheckHook
, requests-mock
2019-05-04 21:43:49 +00:00
}:
buildPythonPackage rec {
pname = "pyatmo";
2021-06-19 01:39:10 +00:00
version = "5.1.0";
disabled = pythonOlder "3.7";
2019-05-04 21:43:49 +00:00
src = fetchFromGitHub {
owner = "jabesq";
2021-01-24 01:50:04 +00:00
repo = "pyatmo";
rev = "v${version}";
2021-06-19 01:39:10 +00:00
sha256 = "0szk3wjcrllzvpix66iq3li54pw0c1knlx8wn1z9kqhkrb8r200x";
2019-05-04 21:43:49 +00:00
};
postPatch = ''
substituteInPlace setup.cfg \
2021-01-24 01:50:04 +00:00
--replace "oauthlib~=3.1" "oauthlib" \
--replace "requests~=2.24" "requests"
'';
propagatedBuildInputs = [
2021-06-02 23:45:39 +00:00
aiohttp
oauthlib
requests
requests_oauthlib
];
checkInputs = [
freezegun
2021-06-02 23:45:39 +00:00
pytest-asyncio
pytestCheckHook
requests-mock
];
pythonImportsCheck = [ "pyatmo" ];
2019-05-04 21:43:49 +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";
2019-05-04 21:43:49 +00:00
maintainers = with maintainers; [ delroth ];
};
}