@@ -1,9 +1,7 @@
11{ lib, stdenv, fetchurl, fetchpatch, libpcap, pkg-config, openssl, lua5_3
22, pcre, libssh2
3−, graphicalSupport ? false
43, libX11 ? null
54, gtk2 ? null
6−, python2 ? null
75, makeWrapper ? null
86, withLua ? true
97}:
@@ -11,7 +9,7 @@
119with lib;
1210
1311stdenv.mkDerivation rec {
14− pname = "nmap${optionalString graphicalSupport "-graphical"}";
12+ pname = "nmap";
1513 version = "7.92";
1614
1715 src = fetchurl {
@@ -41,7 +39,9 @@ stdenv.mkDerivation rec {
4139 configureFlags = [
4240 (if withLua then "--with-liblua=${lua5_3}" else "--without-liblua")
4341 "--with-liblinear=included"
44− ] ++ optionals (!graphicalSupport) [ "--without-ndiff" "--without-zenmap" ];
42+ "--without-ndiff"
43+ "--without-zenmap"
44+ ];
4545
4646 makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
4747 "AR=${stdenv.cc.bintools.targetPrefix}ar"
@@ -49,20 +49,8 @@ stdenv.mkDerivation rec {
4949 "CC=${stdenv.cc.targetPrefix}gcc"
5050 ];
5151
52− pythonPath = with python2.pkgs; optionals graphicalSupport [
53− pygtk pysqlite pygobject2 pycairo
54− ];
55−
56− nativeBuildInputs = [ pkg-config ] ++ optionals graphicalSupport [ python2.pkgs.wrapPython ];
57− buildInputs = [ pcre libssh2 libpcap openssl ] ++ optionals graphicalSupport (with python2.pkgs; [
58− python2 libX11 gtk2
59− ]);
60−
61− postInstall = optionalString graphicalSupport ''
62− buildPythonPath "$out $pythonPath"
63− patchPythonScript $out/bin/ndiff
64− patchPythonScript $out/bin/zenmap
65− '';
52+ nativeBuildInputs = [ pkg-config ];
53+ buildInputs = [ pcre libssh2 libpcap openssl ];
6654
6755 enableParallelBuilding = true;
6856