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-04-21 21:51:08 +01:00
|
|
|
version = "0.0.43";
|
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-04-21 21:51:08 +01:00
|
|
|
sha256 = "sha256-OobKlAymXXvQH6m77Uqn2eoTlWgs8EBxYIDFJ5wwMKA=";
|
2019-05-10 14:34:29 +01:00
|
|
|
};
|
|
|
|
|
2021-03-30 09:51:35 +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
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|