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.29.1";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.6";
23
24 src = fetchFromGitHub {
25 owner = "SoCo";
26 repo = "SoCo";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-Kp9rG7fJzvmnLpjVulf9kODoABdjaaHvgyed9I+FHVA=";
29 };
30
31 propagatedBuildInputs = [
32 appdirs
33 ifaddr
34 lxml
35 requests
36 xmltodict
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 graphviz
42 mock
43 requests-mock
44 ];
45
46 pythonImportsCheck = [
47 "soco"
48 ];
49
50 passthru.updateScript = nix-update-script { };
51
52 meta = with lib; {
53 description = "CLI and library to control Sonos speakers";
54 homepage = "http://python-soco.com/";
55 changelog = "https://github.com/SoCo/SoCo/releases/tag/v${version}";
56 license = licenses.mit;
57 maintainers = with maintainers; [ lovesegfault ];
58 };
59}