1{ lib 2, buildPythonPackage 3, fetchPypi 4, nmap 5}: 6 7buildPythonPackage rec { 8 pname = "python-nmap"; 9 version = "0.7.1"; 10 11 src = fetchPypi { 12 inherit pname version; 13 hash = "sha256-91r2uR3Y47DDH4adsyFj9iraaGlF5bfCX4S8D3+tO2Q="; 14 }; 15 16 propagatedBuildInputs = [ 17 nmap 18 ]; 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 = [ 29 "nmap" 30 ]; 31 32 meta = with lib; { 33 description = "Python library which helps in using nmap"; 34 longDescription = '' 35 python-nmap is a Python library which helps in using nmap port scanner. It 36 allows to easily manipulate nmap scan results and will be a perfect tool 37 for systems administrators who want to automatize scanning task and reports. 38 It also supports nmap script outputs. 39 ''; 40 homepage = "http://xael.org/pages/python-nmap-en.html"; 41 license = with licenses; [ gpl3Plus ]; 42 maintainers = with maintainers; [ fab ]; 43 }; 44}