nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 click,
5 cryptography,
6 fetchFromGitHub,
7 hatchling,
8 orjson,
9 pytest-asyncio,
10 pytest-timeout,
11 pytestCheckHook,
12 xdg,
13 zeroconf,
14}:
15
16buildPythonPackage rec {
17 pname = "pylutron-caseta";
18 version = "0.27.0";
19 pyproject = true;
20
21 src = fetchFromGitHub {
22 owner = "gurumitts";
23 repo = "pylutron-caseta";
24 tag = "v${version}";
25 hash = "sha256-GCLsFEPO4z5Jf8Bi/CChsVqmfZo12UcY1iG6Xbojomo=";
26 };
27
28 build-system = [ hatchling ];
29
30 dependencies = [
31 cryptography
32 orjson
33 ];
34
35 optional-dependencies = {
36 cli = [
37 click
38 xdg
39 zeroconf
40 ];
41 };
42
43 nativeCheckInputs = [
44 pytest-asyncio
45 pytest-timeout
46 pytestCheckHook
47 ];
48
49 pytestFlags = [ "--asyncio-mode=auto" ];
50
51 pythonImportsCheck = [ "pylutron_caseta" ];
52
53 meta = {
54 description = "Python module to control Lutron Caseta devices";
55 homepage = "https://github.com/gurumitts/pylutron-caseta";
56 changelog = "https://github.com/gurumitts/pylutron-caseta/blob/v${version}/CHANGELOG.md";
57 license = lib.licenses.asl20;
58 maintainers = with lib.maintainers; [ fab ];
59 };
60}