1{
2 lib,
3 fetchFromGitHub,
4 python3,
5}:
6
7python3.pkgs.buildPythonApplication {
8 pname = "nmap-parse";
9 version = "0-unstable-2022-09-26";
10 format = "other";
11
12 src = fetchFromGitHub {
13 owner = "jonny1102";
14 repo = "nmap-parse";
15 # https://github.com/jonny1102/nmap-parse/issues/12
16 rev = "ae270ac9ce05bfbe822dbbb29411adf562d40abf";
17 hash = "sha256-iaE4a5blbDPaKPRnR46+AfegXOEW88i+z/VIVGCepeM=";
18 };
19
20 propagatedBuildInputs = with python3.pkgs; [
21 beautifulsoup4
22 cmd2
23 colorama
24 ipy
25 tabulate
26 ];
27
28 installPhase = ''
29 runHook preInstall
30
31 install -Dm 755 "nmap-parse.py" "$out/bin/nmap-parse"
32
33 install -vd $out/${python3.sitePackages}/
34 cp -R modules $out/${python3.sitePackages}
35
36 runHook postInstall
37 '';
38
39 # Project has no tests
40 doCheck = false;
41
42 meta = with lib; {
43 description = "Command line nmap XML parser";
44 homepage = "https://github.com/jonny1102/nmap-parse";
45 license = licenses.mit;
46 maintainers = with maintainers; [ fab ];
47 mainProgram = "nmap-parse";
48 };
49}