nixpkgs/pkgs/development/python-modules/soco/default.nix
2020-04-07 10:32:21 -07:00

35 lines
851 B
Nix

{ 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;
};
}