summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pyheos/default.nix
blob: ad154e5cd6ea3fe905a221c6a206f4fc5d7f1128 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  pytest-asyncio,
  pytestCheckHook,
  stdenv,
  syrupy,
}:

buildPythonPackage rec {
  pname = "pyheos";
  version = "1.0.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "andrewsayre";
    repo = "pyheos";
    tag = version;
    hash = "sha256-waOeUAvQtx8klFVGnMHi6/OI2s6fxgVjB8aBlaKtklQ=";
  };

  build-system = [ setuptools ];

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
    syrupy
  ];

  disabledTests =
    [
      # accesses network
      "test_connect_timeout"
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      # OSError: could not bind on any address out of [('127.0.0.2', 1255)]
      "test_failover"
    ];

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [ "pyheos" ];

  meta = {
    changelog = "https://github.com/andrewsayre/pyheos/releases/tag/${src.tag}";
    description = "Async python library for controlling HEOS devices through the HEOS CLI Protocol";
    homepage = "https://github.com/andrewsayre/pyheos";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}