summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/pysonos/default.nix
blob: 5e06250f4761621c984b96466329097f1713f178 (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,
  isPy3k,
  xmltodict,
  ifaddr,
  requests,

  # Test dependencies
  pytestCheckHook,
  mock,
  requests-mock,
}:

buildPythonPackage rec {
  pname = "pysonos";
  version = "0.0.54";
  format = "setuptools";

  disabled = !isPy3k;

  # pypi package is missing test fixtures
  src = fetchFromGitHub {
    owner = "amelchio";
    repo = "pysonos";
    rev = "v${version}";
    hash = "sha256-gBOknYHL5nQWFVhCbLN0Ah+1fovcNY4P2myryZnUadk=";
  };

  propagatedBuildInputs = [
    ifaddr
    requests
    xmltodict
  ];

  nativeCheckInputs = [
    pytestCheckHook
    mock
    requests-mock
  ];

  disabledTests = [
    "test_desc_from_uri" # test requires network access
  ];

  meta = {
    description = "SoCo fork with fixes for Home Assistant";
    homepage = "https://github.com/amelchio/pysonos";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ juaningan ];
  };
}