diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 1d4a63dd030a..1cf7513d65e8 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7170,6 +7170,12 @@ githubId = 13791; name = "Luke Gorrie"; }; + luker = { + email = "luker@fenrirproject.org"; + github = "LucaFulchir"; + githubId = 2486026; + name = "Luca Fulchir"; + }; lumi = { email = "lumi@pew.im"; github = "lumi-me-not"; diff --git a/pkgs/development/python-modules/pynut2/default.nix b/pkgs/development/python-modules/pynut2/default.nix new file mode 100644 index 000000000000..a530007e91e0 --- /dev/null +++ b/pkgs/development/python-modules/pynut2/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +#, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pynut2"; + version = "2.1.2"; + + src = fetchFromGitHub { + owner = "mezz64"; + repo = "python-nut2"; + rev = version; + sha256 = "1lg7n1frndfgw73s0ssl1h7kc6zxm7fpiwlc6v6d60kxzaj1dphx"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # tests are completely broken, wrong imports and old api + #checkInputs = [ + # pytestCheckHook + #]; + + pythonImportsCheck = [ "pynut2.nut2" ]; + + meta = with lib; { + description = "API overhaul of PyNUT, a Python library to allow communication with NUT (Network UPS Tools) servers."; + homepage = "https://github.com/mezz64/python-nut2"; + license = with licenses; [ gpl3Plus ]; + maintainers = [ maintainers.luker ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 8888fba7b74d..9d6a55b57ace 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -589,7 +589,7 @@ "nuki" = ps: with ps; [ pynuki ]; "numato" = ps: with ps; [ ]; # missing inputs: numato-gpio "number" = ps: with ps; [ ]; - "nut" = ps: with ps; [ ]; # missing inputs: pynut2 + "nut" = ps: with ps; [ pynut2 ]; "nws" = ps: with ps; [ pynws ]; "nx584" = ps: with ps; [ pynx584 ]; "nzbget" = ps: with ps; [ ]; # missing inputs: pynzbgetapi diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 09b2a3756cdf..bdfdb7fdf6dd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6052,6 +6052,8 @@ in { pynuki = callPackage ../development/python-modules/pynuki { }; + pynut2 = callPackage ../development/python-modules/pynut2 { }; + pynws = callPackage ../development/python-modules/pynws { }; pynx584 = callPackage ../development/python-modules/pynx584 { };