nixpkgs/pkgs/development/python-modules/soco/default.nix
2021-05-27 00:34:25 +02:00

53 lines
933 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, graphviz
, ifaddr
, pythonOlder
, mock
, nix-update-script
, pytestCheckHook
, requests
, requests-mock
, xmltodict
}:
buildPythonPackage rec {
pname = "soco";
version = "0.22.3";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "SoCo";
repo = "SoCo";
rev = "v${version}";
sha256 = "sha256-RCWXXk5aQQYqyxm65M96XBoMS5UlYqyAz3aM/DVghRw=";
};
propagatedBuildInputs = [
ifaddr
requests
xmltodict
];
checkInputs = [
pytestCheckHook
graphviz
mock
requests-mock
];
pythonImportsCheck = [ "soco" ];
passthru.updateScript = nix-update-script {
attrPath = "python3Packages.${pname}";
};
meta = with lib; {
homepage = "http://python-soco.com/";
description = "A CLI and library to control Sonos speakers";
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault ];
};
}