From d2905c6fbc337d752f57d65e2c9f32f3470fc477 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 5 May 2022 16:41:42 +0200 Subject: [PATCH 1/2] python310Packages.pyrainbird: init at 0.4.3 --- .../python-modules/pyrainbird/default.nix | 58 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 60 insertions(+) create mode 100644 pkgs/development/python-modules/pyrainbird/default.nix diff --git a/pkgs/development/python-modules/pyrainbird/default.nix b/pkgs/development/python-modules/pyrainbird/default.nix new file mode 100644 index 00000000000..74f0ed630a2 --- /dev/null +++ b/pkgs/development/python-modules/pyrainbird/default.nix @@ -0,0 +1,58 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, parameterized +, pycryptodome +, pytestCheckHook +, pythonOlder +, pyyaml +, requests +, responses +, setuptools +}: + +buildPythonPackage rec { + pname = "pyrainbird"; + version = "0.4.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "jbarrancos"; + repo = pname; + rev = version; + hash = "sha256-uRHknWvoPKPu3B5MbSEUlWqBKwAbNMwsgXuf6PZxhkU="; + }; + + propagatedBuildInputs = [ + pycryptodome + pyyaml + requests + setuptools + ]; + + checkInputs = [ + pytestCheckHook + parameterized + responses + ]; + + postPatch = '' + substituteInPlace requirements.txt \ + --replace "datetime" "" + substituteInPlace pytest.ini \ + --replace "--cov=pyrainbird --cov-report=term-missing --pep8 --flakes --mccabe" "" + ''; + + pythonImportsCheck = [ + "pyrainbird" + ]; + + meta = with lib; { + description = "Module to interact with Rainbird controllers"; + homepage = "https://github.com/jbarrancos/pyrainbird/"; + 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 df2df3a8333..2f82e821666 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7701,6 +7701,8 @@ in { py-radix = callPackage ../development/python-modules/py-radix { }; + pyrainbird = callPackage ../development/python-modules/pyrainbird { }; + pyramid_beaker = callPackage ../development/python-modules/pyramid_beaker { }; pyramid = callPackage ../development/python-modules/pyramid { }; From 815f83a01ee32906a5cf06fb0690a3222630d5d8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 5 May 2022 16:42:55 +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..d812a227d64 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2122,7 +2122,8 @@ radiotherm ]; "rainbird" = ps: with ps; [ - ]; # missing inputs: pyrainbird + pyrainbird + ]; "raincloud" = ps: with ps; [ ]; # missing inputs: raincloudy "rainforest_eagle" = ps: with ps; [