2021-04-12 18:23:04 +00:00
|
|
|
{ lib
|
2023-10-19 13:55:26 +00:00
|
|
|
, async-timeout
|
2021-04-12 18:23:04 +00:00
|
|
|
, buildPythonPackage
|
2024-02-07 01:22:34 +00:00
|
|
|
, click
|
2021-04-12 18:23:04 +00:00
|
|
|
, cryptography
|
|
|
|
, fetchFromGitHub
|
2024-02-07 01:22:34 +00:00
|
|
|
, hatchling
|
2021-04-12 18:23:04 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-timeout
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-02-07 01:22:34 +00:00
|
|
|
, xdg
|
|
|
|
, zeroconf
|
2021-04-12 18:23:04 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylutron-caseta";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.20.0";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2022-01-03 16:56:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gurumitts";
|
2024-02-07 01:22:34 +00:00
|
|
|
repo = "pylutron-caseta";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-7uUNLlVrMEgah2YvTECC4S2WArAQjeAyfgDd62sQsYA=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
2024-02-07 01:22:34 +00:00
|
|
|
hatchling
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
2024-02-07 01:22:34 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
async-timeout
|
2021-04-12 18:23:04 +00:00
|
|
|
];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
cli = [
|
|
|
|
click
|
|
|
|
xdg
|
|
|
|
zeroconf
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-12 18:23:04 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-timeout
|
|
|
|
pytestCheckHook
|
2023-10-19 13:55:26 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
async-timeout
|
2021-04-12 18:23:04 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
2022-11-21 17:40:18 +00:00
|
|
|
"--asyncio-mode=auto"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pylutron_caseta"
|
|
|
|
];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module o control Lutron Caseta devices";
|
|
|
|
homepage = "https://github.com/gurumitts/pylutron-caseta";
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/gurumitts/pylutron-caseta/blob/v${version}/CHANGELOG.md";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|