2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
click,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-timeout,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ cryptography ] ++ 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
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [ async-timeout ];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "--asyncio-mode=auto" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|