2019-05-10 14:34:29 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-02-02 14:39:29 +00:00
|
|
|
, fetchFromGitHub
|
2019-05-10 14:34:29 +01:00
|
|
|
, isPy3k
|
|
|
|
, xmltodict
|
|
|
|
, requests
|
|
|
|
, ifaddr
|
|
|
|
|
|
|
|
# Test dependencies
|
2019-07-13 10:23:00 +01:00
|
|
|
, pytest, pylint, flake8, graphviz
|
2019-05-10 14:34:29 +01:00
|
|
|
, mock, sphinx, sphinx_rtd_theme
|
2021-02-02 14:39:29 +00:00
|
|
|
, requests-mock
|
2019-05-10 14:34:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysonos";
|
2021-02-02 14:39:29 +00:00
|
|
|
version = "0.0.40";
|
2019-05-10 14:34:29 +01:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2021-02-02 14:39:29 +00:00
|
|
|
# pypi package is missing test fixtures
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amelchio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0a0c7jwv39nbvpdcx32sd8kjmj4nyrd7k0yxhpmxdnx4zr4vvzqg";
|
2019-05-10 14:34:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ xmltodict requests ifaddr ];
|
|
|
|
|
|
|
|
checkInputs = [
|
2019-07-13 10:23:00 +01:00
|
|
|
pytest pylint flake8 graphviz
|
2019-05-10 14:34:29 +01:00
|
|
|
mock sphinx sphinx_rtd_theme
|
2021-02-02 14:39:29 +00:00
|
|
|
requests-mock
|
2019-05-10 14:34:29 +01:00
|
|
|
];
|
|
|
|
|
2019-07-13 10:23:00 +01:00
|
|
|
checkPhase = ''
|
|
|
|
pytest --deselect=tests/test_discovery.py::TestDiscover::test_discover
|
|
|
|
'';
|
|
|
|
|
2019-05-10 14:34:29 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/amelchio/pysonos";
|
2019-05-10 14:34:29 +01:00
|
|
|
description = "A SoCo fork with fixes for Home Assistant";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ juaningan ];
|
|
|
|
};
|
|
|
|
}
|