From 88fe05a59b3a0c5ca8dcea44e8883d50208a4225 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Mar 2021 19:58:23 +0100 Subject: [PATCH 1/2] python3Packages.python-nmap: init at 0.6.4 --- .../python-modules/python-nmap/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/python-nmap/default.nix diff --git a/pkgs/development/python-modules/python-nmap/default.nix b/pkgs/development/python-modules/python-nmap/default.nix new file mode 100644 index 00000000000..745d6c67eac --- /dev/null +++ b/pkgs/development/python-modules/python-nmap/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nmap +}: + +buildPythonPackage rec { + pname = "python-nmap"; + version = "0.6.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "013q2797d9sf6mrj7x1hqfcql5gqgg50zgiifp2yypfa4k8cwjsx"; + }; + + propagatedBuildInputs = [ nmap ]; + + postPatch = '' + substituteInPlace setup.cfg --replace "universal=3" "universal=1" + ''; + + # Tests requires sudo and performs scans + doCheck = false; + pythonImportsCheck = [ "nmap" ]; + + meta = with lib; { + description = "Python library which helps in using nmap"; + longDescription = '' + python-nmap is a Python library which helps in using nmap port scanner. It + allows to easily manipulate nmap scan results and will be a perfect tool + for systems administrators who want to automatize scanning task and reports. + It also supports nmap script outputs. + ''; + homepage = "http://xael.org/pages/python-nmap-en.html"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fc77de9a88d..4dfabc30ad5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6493,6 +6493,8 @@ in { inherit (pkgs) pkg-config; }; + python-nmap = callPackage ../development/python-modules/python-nmap { }; + python-nomad = callPackage ../development/python-modules/python-nomad { }; python-oauth2 = callPackage ../development/python-modules/python-oauth2 { }; From 33f6c146a064a8bb283e56fb5ed013a94a2fe3f1 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 5 Mar 2021 19:58:41 +0100 Subject: [PATCH 2/2] 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 bc9768a7345..0425fae5d70 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -549,7 +549,7 @@ "niko_home_control" = ps: with ps; [ ]; # missing inputs: niko-home-control "nilu" = ps: with ps; [ ]; # missing inputs: niluclient "nissan_leaf" = ps: with ps; [ ]; # missing inputs: pycarwings2 - "nmap_tracker" = ps: with ps; [ getmac ]; # missing inputs: python-nmap + "nmap_tracker" = ps: with ps; [ getmac python-nmap ]; "nmbs" = ps: with ps; [ ]; # missing inputs: pyrail "no_ip" = ps: with ps; [ ]; "noaa_tides" = ps: with ps; [ ]; # missing inputs: noaa-coops