1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 isPy3k,
6 xmltodict,
7 ifaddr,
8 requests,
9
10 # Test dependencies
11 pytestCheckHook,
12 mock,
13 requests-mock,
14}:
15
16buildPythonPackage rec {
17 pname = "pysonos";
18 version = "0.0.54";
19 format = "setuptools";
20
21 disabled = !isPy3k;
22
23 # pypi package is missing test fixtures
24 src = fetchFromGitHub {
25 owner = "amelchio";
26 repo = "pysonos";
27 rev = "v${version}";
28 hash = "sha256-gBOknYHL5nQWFVhCbLN0Ah+1fovcNY4P2myryZnUadk=";
29 };
30
31 propagatedBuildInputs = [
32 ifaddr
33 requests
34 xmltodict
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 mock
40 requests-mock
41 ];
42
43 disabledTests = [
44 "test_desc_from_uri" # test requires network access
45 ];
46
47 meta = with lib; {
48 description = "SoCo fork with fixes for Home Assistant";
49 homepage = "https://github.com/amelchio/pysonos";
50 license = licenses.mit;
51 maintainers = with maintainers; [ juaningan ];
52 };
53}