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
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nexia";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "1.0.2";
|
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;
|
|
|
|
rev = version;
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-+3nWf9GjX7ovnumwSq3l1dcHrgWIPPzKsPmI8/tT7Lo=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|