nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pydantic,
6 pytestCheckHook,
7 requests,
8 setuptools,
9 websocket-client,
10}:
11
12buildPythonPackage (finalAttrs: {
13 pname = "dirigera";
14 version = "1.2.6";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "Leggin";
19 repo = "dirigera";
20 tag = "v${finalAttrs.version}";
21 hash = "sha256-5pfzmaIkIEtxDtkhG1lOLSTjWahEDgQKLJKbAG5rBjE=";
22 };
23
24 build-system = [ setuptools ];
25
26 dependencies = [
27 pydantic
28 requests
29 websocket-client
30 ];
31
32 nativeCheckInputs = [ pytestCheckHook ];
33
34 pythonImportsCheck = [ "dirigera" ];
35
36 meta = {
37 description = "Module for controlling the IKEA Dirigera Smart Home Hub";
38 homepage = "https://github.com/Leggin/dirigera";
39 changelog = "https://github.com/Leggin/dirigera/releases/tag/${finalAttrs.src.tag}";
40 license = lib.licenses.mit;
41 maintainers = with lib.maintainers; [ fab ];
42 mainProgram = "generate-token";
43 };
44})