aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/soco/default.nix
blob: 0af09cc01ce7189715a54e76c948e6324c5d258f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, buildPythonPackage, fetchPypi, xmltodict, requests

# Test dependencies
, pytest, pytestcov, coveralls, pylint, flake8, graphviz, mock, sphinx
, sphinx_rtd_theme
}:

buildPythonPackage rec {
  pname = "soco";
  version = "0.19";

  src = fetchPypi {
    inherit pname version;
    sha256 = "0dgca286vhrabm4r4jj545k895z6w2c70ars06vrjhf9cpgg7qck";
  };

  postPatch = ''
    # https://github.com/SoCo/SoCo/pull/670
    substituteInPlace requirements-dev.txt \
      --replace "pytest-cov>=2.4.0,<2.6" "pytest-cov>=2.4.0"
  '';

  propagatedBuildInputs = [ xmltodict requests ];
  checkInputs = [
    pytest pytestcov coveralls pylint flake8 graphviz mock sphinx
    sphinx_rtd_theme
  ];

  meta = {
    homepage = "http://python-soco.com/";
    description = "A CLI and library to control Sonos speakers";
    license = lib.licenses.mit;
  };
}