nixpkgs/pkgs/development/python-modules/soco/default.nix

53 lines
934 B
Nix
Raw Normal View History

2021-05-26 23:34:25 +01:00
{ lib
, buildPythonPackage
2020-12-09 00:28:41 +00:00
, fetchFromGitHub
, graphviz
2021-03-01 04:13:04 +00:00
, ifaddr
2021-05-26 23:34:25 +01:00
, pythonOlder
2020-12-09 00:28:41 +00:00
, mock
2021-03-01 04:13:04 +00:00
, nix-update-script
2020-12-09 00:28:41 +00:00
, pytestCheckHook
, requests
2021-03-01 04:13:04 +00:00
, requests-mock
2020-12-09 00:28:41 +00:00
, xmltodict
}:
buildPythonPackage rec {
pname = "soco";
2021-06-19 02:39:14 +01:00
version = "0.22.6";
2021-05-26 23:34:25 +01:00
disabled = pythonOlder "3.6";
2020-12-09 00:28:41 +00:00
src = fetchFromGitHub {
owner = "SoCo";
repo = "SoCo";
rev = "v${version}";
2021-06-19 02:39:14 +01:00
sha256 = "06qar4syi6g3x84klnk0mg6w5ryl50c5k3s1hag4rimbkap3x6ks";
};
2020-12-09 00:28:41 +00:00
propagatedBuildInputs = [
2021-03-01 04:13:04 +00:00
ifaddr
2020-12-09 00:28:41 +00:00
requests
xmltodict
];
2021-03-01 04:13:04 +00:00
checkInputs = [
2020-12-09 00:28:41 +00:00
pytestCheckHook
graphviz
mock
2021-03-01 04:13:04 +00:00
requests-mock
];
2021-05-26 23:34:25 +01:00
pythonImportsCheck = [ "soco" ];
2021-03-01 04:13:04 +00:00
passthru.updateScript = nix-update-script {
attrPath = "python3Packages.${pname}";
};
2020-12-09 00:28:41 +00:00
meta = with lib; {
2020-04-07 08:27:14 +01:00
homepage = "http://python-soco.com/";
description = "A CLI and library to control Sonos speakers";
2020-12-09 00:28:41 +00:00
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault ];
};
}