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/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index d3270846a53..cf8c0641bc7 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 diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index b66fd64d109..cb455738080 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -332,6 +332,7 @@ in with py.pkgs; buildPythonApplication rec { "notify" "notion" "number" + "nx584" "omnilogic" "ondilo_ico" "openerz" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 439d4d8e4a5..edeb7ffb3d0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4964,6 +4964,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 { };