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-20 23:08:51 +00:00
|
|
|
version = "0.0.49";
|
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-20 23:08:51 +00:00
|
|
|
sha256 = "sha256-f8MBf2E7kHzvdt7oBwdJZ91jlU6I5np1FhOmxgxbqYw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +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
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A SoCo fork with fixes for Home Assistant";
|
2021-05-20 23:08:51 +00:00
|
|
|
homepage = "https://github.com/amelchio/pysonos";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ juaningan ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|