about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyheos/default.nix
blob: 1600baba392d6fdd6a291855839018d3d531dc6e (plain) (blame)
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
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonAtLeast
, pytest-asyncio
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pyheos";
  version = "0.7.2";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "andrewsayre";
    repo = "pyheos";
    rev = version;
    sha256 = "0rgzg7lnqzzqrjp73c1hj1hq8p0j0msyih3yr4wa2rj81s8ihmby";
  };

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ];

  disabledTests = [
    # accesses network
    "test_connect_timeout"
  ] ++ lib.optionals (pythonAtLeast "3.12") [
    # stuck in epoll
    "test_disconnect"
    "test_commands_fail_when_disconnected"
  ];

  pythonImportsCheck = [ "pyheos" ];

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