From a18a0fa29d69ef50f5cfdecda9f7f942aca2ba67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 10 May 2022 00:44:21 +0000 Subject: [PATCH 1/2] python3Packages.pysabnzbd: init at 1.1.1 --- .../python-modules/pysabnzbd/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/pysabnzbd/default.nix diff --git a/pkgs/development/python-modules/pysabnzbd/default.nix b/pkgs/development/python-modules/pysabnzbd/default.nix new file mode 100644 index 000000000000..e77b8cd68188 --- /dev/null +++ b/pkgs/development/python-modules/pysabnzbd/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, aiohttp +}: + +buildPythonPackage rec { + pname = "pysabnzbd"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "jeradM"; + repo = "pysabnzbd"; + rev = "8e6cd1869c8cc99a4560ea1b178f0a1efd89e460"; # tag is missing + hash = "sha256-Ubl+kdcjMm1A7pa3Q5G+fFBwPIxA375Ci04/vVyUl+A="; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + # upstream has no tests + doCheck = false; + + pythonImportsCheck = [ "pysabnzbd" ]; + + meta = { + description = "Python wrapper for SABnzbd API"; + homepage = "https://github.com/jeradM/pysabnzbd"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dec038f96923..0cdc28e9cf13 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6430,6 +6430,8 @@ in { pyrogram = callPackage ../development/python-modules/pyrogram { }; + pysabnzbd = callPackage ../development/python-modules/pysabnzbd { }; + pysbd = callPackage ../development/python-modules/pysbd { }; pyshark = callPackage ../development/python-modules/pyshark { }; From 33892e97554a4af39dde7f7243468f01c3809219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 10 May 2022 00:46:20 +0000 Subject: [PATCH 2/2] home-assistant: support sabnzbd component --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index bfaf4f6f76d6..bf1223d752d5 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2245,7 +2245,8 @@ "russound_rnet" = ps: with ps; [ ]; # missing inputs: russound "sabnzbd" = ps: with ps; [ - ]; # missing inputs: pysabnzbd + pysabnzbd + ]; "safe_mode" = ps: with ps; [ pyturbojpeg aiohttp-cors @@ -3594,6 +3595,7 @@ "rss_feed_template" "rtsp_to_webrtc" "ruckus_unleashed" + "sabnzbd" "safe_mode" "samsungtv" "scene"