|
|
|
@ -1,9 +1,7 @@ |
|
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, libpcap, pkg-config, openssl, lua5_3 |
|
|
|
|
, pcre, libssh2 |
|
|
|
|
, graphicalSupport ? false |
|
|
|
|
, libX11 ? null |
|
|
|
|
, gtk2 ? null |
|
|
|
|
, python2 ? null |
|
|
|
|
, makeWrapper ? null |
|
|
|
|
, withLua ? true |
|
|
|
|
}: |
|
|
|
@ -11,7 +9,7 @@ |
|
|
|
|
with lib; |
|
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec { |
|
|
|
|
pname = "nmap${optionalString graphicalSupport "-graphical"}"; |
|
|
|
|
pname = "nmap"; |
|
|
|
|
version = "7.92"; |
|
|
|
|
|
|
|
|
|
src = fetchurl { |
|
|
|
@ -41,7 +39,9 @@ stdenv.mkDerivation rec { |
|
|
|
|
configureFlags = [ |
|
|
|
|
(if withLua then "--with-liblua=${lua5_3}" else "--without-liblua") |
|
|
|
|
"--with-liblinear=included" |
|
|
|
|
] ++ optionals (!graphicalSupport) [ "--without-ndiff" "--without-zenmap" ]; |
|
|
|
|
"--without-ndiff" |
|
|
|
|
"--without-zenmap" |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ |
|
|
|
|
"AR=${stdenv.cc.bintools.targetPrefix}ar" |
|
|
|
@ -49,20 +49,8 @@ stdenv.mkDerivation rec { |
|
|
|
|
"CC=${stdenv.cc.targetPrefix}gcc" |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
pythonPath = with python2.pkgs; optionals graphicalSupport [ |
|
|
|
|
pygtk pysqlite pygobject2 pycairo |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ] ++ optionals graphicalSupport [ python2.pkgs.wrapPython ]; |
|
|
|
|
buildInputs = [ pcre libssh2 libpcap openssl ] ++ optionals graphicalSupport (with python2.pkgs; [ |
|
|
|
|
python2 libX11 gtk2 |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
postInstall = optionalString graphicalSupport '' |
|
|
|
|
buildPythonPath "$out $pythonPath" |
|
|
|
|
patchPythonScript $out/bin/ndiff |
|
|
|
|
patchPythonScript $out/bin/zenmap |
|
|
|
|
''; |
|
|
|
|
nativeBuildInputs = [ pkg-config ]; |
|
|
|
|
buildInputs = [ pcre libssh2 libpcap openssl ]; |
|
|
|
|
|
|
|
|
|
enableParallelBuilding = true; |
|
|
|
|
|
|
|
|
|