1{ lib
2, buildPythonPackage
3, defusedxml
4, fetchFromGitHub
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "python-libnmap";
11 version = "0.7.3";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "savon-noir";
18 repo = "python-libnmap";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-cI8wdOvTmRy2cxLBkJn7vXRBRvewDMNl/tkIiRGhZJ8=";
21 };
22
23 passthru.optional-dependencies = {
24 defusedxml = [
25 defusedxml
26 ];
27 };
28
29 # We don't want the nmap binary being present
30 doCheck = false;
31
32 pythonImportsCheck = [
33 "libnmap"
34 ];
35
36 meta = with lib; {
37 description = "Library to run nmap scans, parse and diff scan results";
38 homepage = "https://github.com/savon-noir/python-libnmap";
39 changelog = "https://github.com/savon-noir/python-libnmap/blob/${version}/CHANGELOG.md";
40 license = licenses.asl20;
41 maintainers = with maintainers; [ fab ];
42 };
43}