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