nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 httpx,
6 protobuf,
7 pytest-asyncio_0,
8 pytest-httpx,
9 pytest-mock,
10 pytestCheckHook,
11 segno,
12 setuptools-scm,
13 syrupy,
14 tenacity,
15 zeroconf,
16}:
17
18buildPythonPackage rec {
19 pname = "devolo-plc-api";
20 version = "1.5.1";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "2Fake";
25 repo = "devolo_plc_api";
26 tag = "v${version}";
27 hash = "sha256-bmZcjvqZwVJzDsdtSbQvJpry2QSSuB6/jOTWG1+jyV4=";
28 };
29
30 postPatch = ''
31 substituteInPlace pyproject.toml \
32 --replace-fail "protobuf>=4.22.0" "protobuf"
33 '';
34
35 build-system = [ setuptools-scm ];
36
37 dependencies = [
38 httpx
39 protobuf
40 segno
41 tenacity
42 zeroconf
43 ];
44
45 __darwinAllowLocalNetworking = true;
46
47 nativeCheckInputs = [
48 pytest-asyncio_0
49 pytest-httpx
50 pytest-mock
51 pytestCheckHook
52 syrupy
53 ];
54
55 disabledTests = [
56 # pytest-httpx compat issue
57 "test_wrong_password_type"
58 ];
59
60 pythonImportsCheck = [ "devolo_plc_api" ];
61
62 meta = {
63 description = "Module to interact with Devolo PLC devices";
64 homepage = "https://github.com/2Fake/devolo_plc_api";
65 changelog = "https://github.com/2Fake/devolo_plc_api/releases/tag/v${version}";
66 license = lib.licenses.gpl3Only;
67 maintainers = with lib.maintainers; [ fab ];
68 };
69}