From de2da79e222c59635c1c2e48e5ead325d9ee3acb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 28 Apr 2023 22:24:59 +0200 Subject: [PATCH] python310Packages.sonos-websocket: init at 0.1.0 --- .../sonos-websocket/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/sonos-websocket/default.nix diff --git a/pkgs/development/python-modules/sonos-websocket/default.nix b/pkgs/development/python-modules/sonos-websocket/default.nix new file mode 100644 index 000000000000..195c6cabc327 --- /dev/null +++ b/pkgs/development/python-modules/sonos-websocket/default.nix @@ -0,0 +1,47 @@ +{ lib +, aiohttp +, async-timeout +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, setuptools +}: + +buildPythonPackage rec { + pname = "sonos-websocket"; + version = "0.1.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "jjlawren"; + repo = "sonos-websocket"; + rev = "refs/tags/${version}"; + hash = "sha256-Pb+L+823Clka0IjVMVEx4A0tJsI1IUhrFbx5Jy+xkgg="; + }; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + aiohttp + async-timeout + ]; + + # Module has no tests + doCheck = false; + + pythonImportsCheck = [ + "sonos_websocket" + ]; + + meta = with lib; { + description = "Library to communicate with Sonos devices over websockets"; + homepage = "https://github.com/jjlawren/sonos-websocket"; + changelog = "https://github.com/jjlawren/sonos-websocket/releases/tag/${version}"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3911f78be3f3..6378c40e170b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11020,6 +11020,8 @@ self: super: with self; { sonarr = callPackage ../development/python-modules/sonarr { }; + sonos-websocket = callPackage ../development/python-modules/sonos-websocket { }; + sopel = callPackage ../development/python-modules/sopel { }; sorl_thumbnail = callPackage ../development/python-modules/sorl_thumbnail { };