2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-12-25 13:55:36 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, graphviz
|
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-01-13 20:06:32 +00:00
|
|
|
version = "0.25.3";
|
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-01-13 20:06:32 +00:00
|
|
|
sha256 = "sha256-CoAmpcXy4oHMk0X4iJ/XMbUnI2m3ZWl8QzobH677FrI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
propagatedBuildInputs = [
|
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
|
|
|
];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
pythonImportsCheck = [ "soco" ];
|
|
|
|
|
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; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://python-soco.com/";
|
|
|
|
description = "A CLI and library to control Sonos speakers";
|
2020-12-25 13:55:36 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lovesegfault ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|