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