2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-12-25 13:55:36 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, graphviz
|
2022-02-10 20:34:41 +00:00
|
|
|
, appdirs
|
2021-03-09 03:18:52 +00:00
|
|
|
, ifaddr
|
2021-05-28 09:39:13 +00:00
|
|
|
, pythonOlder
|
2020-12-25 13:55:36 +00:00
|
|
|
, mock
|
2021-03-09 03:18:52 +00:00
|
|
|
, nix-update-script
|
2020-12-25 13:55:36 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, requests
|
2021-03-09 03:18:52 +00:00
|
|
|
, requests-mock
|
2020-12-25 13:55:36 +00:00
|
|
|
, xmltodict
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "soco";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.26.3";
|
|
|
|
format = "setuptools";
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SoCo";
|
|
|
|
repo = "SoCo";
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
hash = "sha256-tMW5SCsO1XMQdbasMw3qIMwj+Y6wTQHAmTZ+9r8Mffs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
appdirs
|
2021-03-09 03:18:52 +00:00
|
|
|
ifaddr
|
2020-12-25 13:55:36 +00:00
|
|
|
requests
|
|
|
|
xmltodict
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [
|
2020-12-25 13:55:36 +00:00
|
|
|
pytestCheckHook
|
|
|
|
graphviz
|
|
|
|
mock
|
2021-03-09 03:18:52 +00:00
|
|
|
requests-mock
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"soco"
|
|
|
|
];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
attrPath = "python3Packages.${pname}";
|
|
|
|
};
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
meta = with lib; {
|
2022-02-20 05:27:41 +00:00
|
|
|
description = "CLI and library to control Sonos speakers";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://python-soco.com/";
|
2020-12-25 13:55:36 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|