From cd0b646d6f5f2e033bcca0c81f0f7ba0ae872386 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 17 Feb 2022 10:30:28 +0100 Subject: [PATCH 1/4] python3Packages.wsdiscovery: init at 2.0.0 --- .../python-modules/wsdiscovery/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/wsdiscovery/default.nix diff --git a/pkgs/development/python-modules/wsdiscovery/default.nix b/pkgs/development/python-modules/wsdiscovery/default.nix new file mode 100644 index 000000000000..8ba797449494 --- /dev/null +++ b/pkgs/development/python-modules/wsdiscovery/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildPythonPackage +, click +, fetchFromGitHub +, mock +, netifaces +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "wsdiscovery"; + version = "2.0.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "andreikop"; + repo = "python-ws-discovery"; + rev = version; + hash = "sha256-6LGZogNRCnmCrRXvHq9jmHwqW13KQPpaGaao/52JPtk="; + }; + + propagatedBuildInputs = [ + click + netifaces + ]; + + checkInputs = [ + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "wsdiscovery" + ]; + + meta = with lib; { + description = "WS-Discovery implementation for Python"; + homepage = "https://github.com/andreikop/python-ws-discovery"; + license = with licenses; [ lgpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8feee2e01230..79546b0b82fa 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10567,6 +10567,8 @@ in { ws4py = callPackage ../development/python-modules/ws4py { }; + wsdiscovery = callPackage ../development/python-modules/wsdiscovery { }; + wsgi-intercept = callPackage ../development/python-modules/wsgi-intercept { }; wsgiprox = callPackage ../development/python-modules/wsgiprox { }; From 63259c07954081abe897471f1797692e115d6a6a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 17 Feb 2022 10:30:46 +0100 Subject: [PATCH 2/4] 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 bdf0ed345bba..0eab26abd9b8 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -613,7 +613,7 @@ "ondilo_ico" = ps: with ps; [ aiohttp-cors ondilo ]; "onewire" = ps: with ps; [ pi1wire pyownet ]; "onkyo" = ps: with ps; [ onkyo-eiscp ]; - "onvif" = ps: with ps; [ ha-ffmpeg ]; # missing inputs: WSDiscovery onvif-zeep-async + "onvif" = ps: with ps; [ wsdiscovery ha-ffmpeg ]; # missing inputs: onvif-zeep-async "open_meteo" = ps: with ps; [ open-meteo ]; "openalpr_cloud" = ps: with ps; [ ]; "openalpr_local" = ps: with ps; [ ]; From 6683e21a7e0a83a4ac913b807ed4dc17d17b426f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 17 Feb 2022 10:42:10 +0100 Subject: [PATCH 3/4] python3Packages.onvif-zeep-async: init at 1.2.0 --- .../onvif-zeep-async/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/onvif-zeep-async/default.nix diff --git a/pkgs/development/python-modules/onvif-zeep-async/default.nix b/pkgs/development/python-modules/onvif-zeep-async/default.nix new file mode 100644 index 000000000000..5e9a86acc6bd --- /dev/null +++ b/pkgs/development/python-modules/onvif-zeep-async/default.nix @@ -0,0 +1,39 @@ +{ lib +, buildPythonPackage +, fetchPypi +, httpx +, pythonOlder +, zeep +}: + +buildPythonPackage rec { + pname = "onvif-zeep-async"; + version = "1.2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-O4H6oL9cFvgX6whoESA7eRI6+VoT1ncRk/tehQT1WcM="; + }; + + propagatedBuildInputs = [ + httpx + zeep + ]; + + pythonImportsCheck = [ + "onvif" + ]; + + # Tests are not shipped + doCheck = false; + + meta = with lib; { + description = "ONVIF Client Implementation in Python"; + homepage = "https://github.com/hunterjm/python-onvif-zeep-async"; + 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 79546b0b82fa..ee3409bea0b4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5645,6 +5645,8 @@ in { onnx = callPackage ../development/python-modules/onnx { }; + onvif-zeep-async = callPackage ../development/python-modules/onvif-zeep-async { }; + oocsi = callPackage ../development/python-modules/oocsi { }; open-garage = callPackage ../development/python-modules/open-garage { }; From 035a6a94307b60c86aa911aa4eff74dce0e8f0fe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 17 Feb 2022 10:42:22 +0100 Subject: [PATCH 4/4] 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 0eab26abd9b8..5d6e0bef77f5 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -613,7 +613,7 @@ "ondilo_ico" = ps: with ps; [ aiohttp-cors ondilo ]; "onewire" = ps: with ps; [ pi1wire pyownet ]; "onkyo" = ps: with ps; [ onkyo-eiscp ]; - "onvif" = ps: with ps; [ wsdiscovery ha-ffmpeg ]; # missing inputs: onvif-zeep-async + "onvif" = ps: with ps; [ wsdiscovery ha-ffmpeg onvif-zeep-async ]; "open_meteo" = ps: with ps; [ open-meteo ]; "openalpr_cloud" = ps: with ps; [ ]; "openalpr_local" = ps: with ps; [ ]; @@ -1388,6 +1388,7 @@ "oncue" "ondilo_ico" "onewire" + "onvif" "open_meteo" "openalpr_cloud" "openalpr_local"