2021-04-12 18:23:04 +00:00
|
|
|
{ lib
|
2022-06-16 17:23:12 +00:00
|
|
|
, aioresponses
|
2021-04-12 18:23:04 +00:00
|
|
|
, buildPythonPackage
|
2022-07-14 12:49:19 +00:00
|
|
|
, orjson
|
2021-04-12 18:23:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nexia";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "2.0.5";
|
2022-01-19 23:45:15 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
|
|
|
repo = pname;
|
2022-07-18 16:21:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
sha256 = "sha256-8qWqnnh6dSjKyvQvUhvId/2DyEUbTHt7iylJeL4Ko8w=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
orjson
|
2021-04-12 18:23:04 +00:00
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
aioresponses
|
2021-04-12 18:23:04 +00:00
|
|
|
requests-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-01-19 23:45:15 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner",' ""
|
2021-04-12 18:23:04 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"nexia"
|
|
|
|
];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module for Nexia thermostats";
|
|
|
|
homepage = "https://github.com/bdraco/nexia";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|