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";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.24.0";
|
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}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-3VL2JFlukfQdjTP65X40OOsuCUVsY9kuvRKUZ3qEd+s=";
|
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
|
|
|
};
|
|
|
|
}
|