1{
2 lib,
3 appdirs,
4 buildPythonPackage,
5 fetchFromGitHub,
6 graphviz,
7 ifaddr,
8 lxml,
9 mock,
10 nix-update-script,
11 pytestCheckHook,
12 pythonOlder,
13 requests,
14 requests-mock,
15 setuptools,
16 xmltodict,
17}:
18
19buildPythonPackage rec {
20 pname = "soco";
21 version = "0.30.4";
22 pyproject = true;
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchFromGitHub {
27 owner = "SoCo";
28 repo = "SoCo";
29 rev = "refs/tags/v${version}";
30 hash = "sha256-t5Cxlm5HhN6WY6ty4i2MAtqjbC7DwZqSp1g5nybFAH4=";
31 };
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 appdirs
37 ifaddr
38 lxml
39 requests
40 xmltodict
41 ];
42
43 nativeCheckInputs = [
44 pytestCheckHook
45 graphviz
46 mock
47 requests-mock
48 ];
49
50 pythonImportsCheck = [ "soco" ];
51
52 passthru.updateScript = nix-update-script { };
53
54 meta = with lib; {
55 description = "CLI and library to control Sonos speakers";
56 homepage = "http://python-soco.com/";
57 changelog = "https://github.com/SoCo/SoCo/releases/tag/v${version}";
58 license = licenses.mit;
59 maintainers = with maintainers; [ lovesegfault ];
60 };
61}