1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 nmap,
6}:
7
8buildPythonPackage rec {
9 pname = "python-nmap";
10 version = "0.7.1";
11 format = "setuptools";
12
13 src = fetchPypi {
14 inherit pname version;
15 hash = "sha256-91r2uR3Y47DDH4adsyFj9iraaGlF5bfCX4S8D3+tO2Q=";
16 };
17
18 propagatedBuildInputs = [ nmap ];
19
20 postPatch = ''
21 substituteInPlace setup.cfg \
22 --replace "universal=3" "universal=1"
23 '';
24
25 # Tests requires sudo and performs scans
26 doCheck = false;
27
28 pythonImportsCheck = [ "nmap" ];
29
30 meta = with lib; {
31 description = "Python library which helps in using nmap";
32 longDescription = ''
33 python-nmap is a Python library which helps in using nmap port scanner. It
34 allows to easily manipulate nmap scan results and will be a perfect tool
35 for systems administrators who want to automatize scanning task and reports.
36 It also supports nmap script outputs.
37 '';
38 homepage = "https://xael.org/pages/python-nmap-en.html";
39 license = with licenses; [ gpl3Plus ];
40 maintainers = with maintainers; [ fab ];
41 };
42}