From d447d49b9fc111aaaa9cab829527b3a890498db1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 25 Jul 2020 15:59:29 +0200 Subject: [PATCH] python3Packages.pyfritzhome: init at 0.4.2 --- .../python-modules/pyfritzhome/default.nix | 34 +++++++++++++++++++ .../home-assistant/component-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/pyfritzhome/default.nix diff --git a/pkgs/development/python-modules/pyfritzhome/default.nix b/pkgs/development/python-modules/pyfritzhome/default.nix new file mode 100644 index 000000000000..7c5dfecd269b --- /dev/null +++ b/pkgs/development/python-modules/pyfritzhome/default.nix @@ -0,0 +1,34 @@ +{ lib, buildPythonPackage, fetchPypi, pythonOlder +, requests +, nose, mock }: + +buildPythonPackage rec { + pname = "pyfritzhome"; + version = "0.4.2"; + disabled = pythonOlder "3.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "0ncyv8svw0fhs01ijjkb1gcinb3jpyjvv9xw1bhnf4ri7b27g6ww"; + }; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + mock + nose + ]; + + checkPhase = '' + nosetests --with-coverage + ''; + + meta = with lib; { + description = "Python Library to access AVM FRITZ!Box homeautomation"; + homepage = "https://github.com/hthiery/python-fritzhome"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 44aba8299a52..f0fc256b1363 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -266,7 +266,7 @@ "freebox" = ps: with ps; [ aiohttp-cors netdisco zeroconf]; # missing inputs: aiofreepybox "freedns" = ps: with ps; [ ]; "fritz" = ps: with ps; [ fritzconnection]; - "fritzbox" = ps: with ps; [ ]; # missing inputs: pyfritzhome + "fritzbox" = ps: with ps; [ pyfritzhome]; "fritzbox_callmonitor" = ps: with ps; [ fritzconnection]; "fritzbox_netmonitor" = ps: with ps; [ fritzconnection]; "fronius" = ps: with ps; [ ]; # missing inputs: pyfronius diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d644092758a0..0a6c3f7c025a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3835,6 +3835,8 @@ in { pyfribidi = callPackage ../development/python-modules/pyfribidi { }; + pyfritzhome = callPackage ../development/python-modules/pyfritzhome { }; + pyftpdlib = callPackage ../development/python-modules/pyftpdlib { }; filebrowser_safe = callPackage ../development/python-modules/filebrowser_safe { };