2021-03-23 19:22:30 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-07-14 12:49:19 +00:00
|
|
|
, orjson
|
2021-05-03 20:48:10 +00:00
|
|
|
, pytest-aiohttp
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
|
|
|
, wheel
|
2021-03-23 19:22:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pydeconz";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "115";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-01-27 00:19:43 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.11";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Kane610";
|
|
|
|
repo = "deconz";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-NjzONVSJ4GEaIeC5ytnTi8JpZY1yIq3LN8vbMy3n0vs=";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "--cov=pydeconz --cov-report term-missing" "" \
|
|
|
|
--replace "setuptools==" "setuptools>=" \
|
|
|
|
--replace "wheel==" "wheel>="
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2022-07-14 12:49:19 +00:00
|
|
|
orjson
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-23 19:22:30 +00:00
|
|
|
aioresponses
|
2021-05-03 20:48:10 +00:00
|
|
|
pytest-aiohttp
|
2021-03-23 19:22:30 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pydeconz"
|
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library wrapping the Deconz REST API";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "pydeconz";
|
2021-03-23 19:22:30 +00:00
|
|
|
homepage = "https://github.com/Kane610/deconz";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/Kane610/deconz/releases/tag/v${version}";
|
2021-03-23 19:22:30 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|