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
|
2023-08-04 22:07:22 +00:00
|
|
|
, pytest-asyncio
|
2021-04-12 18:23:04 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests-mock
|
2024-01-25 14:12:00 +00:00
|
|
|
, setuptools
|
2021-04-12 18:23:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nexia";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "2.0.8";
|
|
|
|
pyproject = true;
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
2024-01-25 14:12:00 +00:00
|
|
|
repo = "nexia";
|
2022-07-18 16:21:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-dWFARVmGGQxyRhaOrDoAjwXTQNKBFHY2/swFVdEOsmo=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace '"pytest-runner",' ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
aioresponses
|
2021-04-12 18:23:04 +00:00
|
|
|
requests-mock
|
2023-08-04 22:07:22 +00:00
|
|
|
pytest-asyncio
|
2021-04-12 18:23:04 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
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";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/bdraco/nexia/releases/tag/${version}";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|