From 38c5c8c04d6d2eaab7be63d94743960ec12a291a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 5 May 2022 16:50:44 +0200 Subject: [PATCH 1/2] python310Packages.raincloudy: init at 1.1.1 --- .../python-modules/raincloudy/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/raincloudy/default.nix diff --git a/pkgs/development/python-modules/raincloudy/default.nix b/pkgs/development/python-modules/raincloudy/default.nix new file mode 100644 index 00000000000..860f9461e44 --- /dev/null +++ b/pkgs/development/python-modules/raincloudy/default.nix @@ -0,0 +1,61 @@ +{ lib +, beautifulsoup4 +, buildPythonPackage +, fetchFromGitHub +, html5lib +, pytestCheckHook +, pythonOlder +, requests +, requests-mock +, urllib3 +}: + +buildPythonPackage rec { + pname = "raincloudy"; + version = "1.1.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "vanstinator"; + repo = pname; + rev = version; + hash = "sha256-c6tux0DZY56a4BpuiMXtaqm8+JKNDiyMxrFUju3cp2Y="; + }; + + propagatedBuildInputs = [ + requests + beautifulsoup4 + urllib3 + html5lib + ]; + + checkInputs = [ + pytestCheckHook + requests-mock + ]; + + postPatch = '' + # https://github.com/vanstinator/raincloudy/pull/60 + substituteInPlace setup.py \ + --replace "bs4" "beautifulsoup4" \ + --replace "html5lib==1.0.1" "html5lib" + ''; + + pythonImportsCheck = [ + "raincloudy" + ]; + + disabledTests = [ + # Test requires network access + "test_attributes" + ]; + + meta = with lib; { + description = "Module to interact with Melnor RainCloud Smart Garden Watering Irrigation Timer"; + homepage = "https://github.com/vanstinator/raincloudy"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index df2df3a8333..9a8336c6791 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8821,6 +8821,8 @@ in { rainbowstream = callPackage ../development/python-modules/rainbowstream { }; + raincloudy = callPackage ../development/python-modules/raincloudy { }; + ramlfications = callPackage ../development/python-modules/ramlfications { }; random2 = callPackage ../development/python-modules/random2 { }; From ab27f31b98e7ad5f6d8fca45bf7e7aaca3b4c62d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 5 May 2022 16:51:02 +0200 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index ebd4dcc73b7..497590aef2b 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2124,7 +2124,8 @@ "rainbird" = ps: with ps; [ ]; # missing inputs: pyrainbird "raincloud" = ps: with ps; [ - ]; # missing inputs: raincloudy + raincloudy + ]; "rainforest_eagle" = ps: with ps; [ aioeagle ueagle