2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-02-05 17:12:51 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPy3k
|
|
|
|
, xmltodict
|
|
|
|
, ifaddr
|
2021-04-05 15:23:46 +00:00
|
|
|
, requests
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
# Test dependencies
|
|
|
|
, pytestCheckHook
|
|
|
|
, mock
|
2021-02-05 17:12:51 +00:00
|
|
|
, requests-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysonos";
|
2021-05-04 21:07:42 +00:00
|
|
|
version = "0.0.44";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# pypi package is missing test fixtures
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "amelchio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-05-04 21:07:42 +00:00
|
|
|
sha256 = "108818mkb037zs4ikilrskfppcbmqslsm6zaxmy8pphjh7c299mz";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [ ifaddr requests xmltodict ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
pytestCheckHook
|
|
|
|
mock
|
2021-02-05 17:12:51 +00:00
|
|
|
requests-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_desc_from_uri" # test requires network access
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/amelchio/pysonos";
|
|
|
|
description = "A SoCo fork with fixes for Home Assistant";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ juaningan ];
|
|
|
|
};
|
|
|
|
}
|