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
|
|
|
|
, ifaddr
|
2021-03-30 09:51:35 +01:00
|
|
|
, requests
|
2019-05-10 14:34:29 +01:00
|
|
|
|
2021-03-30 09:51:35 +01:00
|
|
|
# Test dependencies
|
|
|
|
, pytestCheckHook
|
|
|
|
, mock
|
2021-02-02 14:39:29 +00:00
|
|
|
, requests-mock
|
2019-05-10 14:34:29 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pysonos";
|
2021-07-23 00:38:22 +01:00
|
|
|
version = "0.0.54";
|
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}";
|
2021-07-23 00:38:22 +01:00
|
|
|
sha256 = "sha256-gBOknYHL5nQWFVhCbLN0Ah+1fovcNY4P2myryZnUadk=";
|
2019-05-10 14:34:29 +01:00
|
|
|
};
|
|
|
|
|
2021-05-13 20:36:12 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ifaddr
|
|
|
|
requests
|
|
|
|
xmltodict
|
|
|
|
];
|
2019-05-10 14:34:29 +01:00
|
|
|
|
|
|
|
checkInputs = [
|
2021-03-30 09:51:35 +01:00
|
|
|
pytestCheckHook
|
|
|
|
mock
|
2021-02-02 14:39:29 +00:00
|
|
|
requests-mock
|
2019-05-10 14:34:29 +01:00
|
|
|
];
|
|
|
|
|
2021-03-30 09:51:35 +01:00
|
|
|
disabledTests = [
|
|
|
|
"test_desc_from_uri" # test requires network access
|
|
|
|
];
|
2019-07-13 10:23:00 +01:00
|
|
|
|
2021-05-13 20:36:12 +01:00
|
|
|
meta = with lib; {
|
2019-05-10 14:34:29 +01:00
|
|
|
description = "A SoCo fork with fixes for Home Assistant";
|
2021-05-13 20:36:12 +01:00
|
|
|
homepage = "https://github.com/amelchio/pysonos";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ juaningan ];
|
2019-05-10 14:34:29 +01:00
|
|
|
};
|
|
|
|
}
|