2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, nmap
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-nmap";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "0.7.1";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "sha256-91r2uR3Y47DDH4adsyFj9iraaGlF5bfCX4S8D3+tO2Q=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
nmap
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-10-28 06:52:43 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "universal=3" "universal=1"
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests requires sudo and performs scans
|
|
|
|
doCheck = false;
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"nmap"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|