From bc1cd4f3b3d2039e78977f8e2a3c292b15336d6a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Apr 2021 18:54:57 +0200 Subject: [PATCH 1/3] python3Packages.pynx584: init at 0.6 --- .../python-modules/pynx584/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/pynx584/default.nix diff --git a/pkgs/development/python-modules/pynx584/default.nix b/pkgs/development/python-modules/pynx584/default.nix new file mode 100644 index 00000000000..0f2fc2e7c0b --- /dev/null +++ b/pkgs/development/python-modules/pynx584/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, flask +, mock +, prettytable +, pyserial +, pytestCheckHook +, pythonOlder +, requests +, stevedore +}: + +buildPythonPackage rec { + pname = "pynx584"; + version = "0.6"; + disabled = pythonOlder "3.6"; + + + src = fetchFromGitHub { + owner = "kk7ds"; + repo = pname; + rev = version; + sha256 = "0if1jq8qiqp4w4zhf2xzzcb8y70hr5pxqzh96i008p6izjha89y6"; + }; + + propagatedBuildInputs = [ + flask + prettytable + pyserial + requests + stevedore + ]; + + checkInputs = [ + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ "nx584" ]; + + meta = with lib; { + description = "Python package for communicating to NX584/NX8E interfaces"; + homepage = "https://github.com/kk7ds/pynx584"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f22df1c35d9..bf4ac5a9f53 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5263,6 +5263,8 @@ in { pynws = callPackage ../development/python-modules/pynws { }; + pynx584 = callPackage ../development/python-modules/pynx584 { }; + pysbd = callPackage ../development/python-modules/pysbd { }; pyshark = callPackage ../development/python-modules/pyshark { }; From 5cd12de25c44c6f7dad3a1460f5e236074dcc12b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 22 Apr 2021 23:03:35 +0200 Subject: [PATCH 2/3] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 4d86e743d15..52bc57fe98a 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -573,7 +573,7 @@ "number" = ps: with ps; [ ]; "nut" = ps: with ps; [ ]; # missing inputs: pynut2 "nws" = ps: with ps; [ pynws ]; - "nx584" = ps: with ps; [ ]; # missing inputs: pynx584 + "nx584" = ps: with ps; [ pynx584 ]; "nzbget" = ps: with ps; [ ]; # missing inputs: pynzbgetapi "oasa_telematics" = ps: with ps; [ ]; # missing inputs: oasatelematics "obihai" = ps: with ps; [ ]; # missing inputs: pyobihai From 3e1f41395b608ce999184b5f0d824211f05b1386 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 22 Apr 2021 23:03:54 +0200 Subject: [PATCH 3/3] home-assistant: enable nx584 tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index ea9a7f5d150..c9706a7b604 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -308,6 +308,7 @@ in with py.pkgs; buildPythonApplication rec { "notify" "notion" "number" + "nx584" "omnilogic" "ozw" "panel_custom"