nmap: fix cross-build (#48264)

This commit is contained in:
volth 2018-10-19 08:30:36 +00:00 committed by Jörg Thalheim
parent a595b872c8
commit f90009cbd7

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libpcap, pkgconfig, openssl
{ stdenv, fetchurl, libpcap, pkgconfig, openssl, lua5_3
, graphicalSupport ? false
, libX11 ? null
, gtk2 ? null
@ -35,11 +35,17 @@ in stdenv.mkDerivation rec {
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
'';
configureFlags = []
configureFlags = [ "--with-liblua=${lua5_3}" ]
++ optional (!pythonSupport) "--without-ndiff"
++ optional (!graphicalSupport) "--without-zenmap"
;
makeFlags = optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"AR=${stdenv.cc.bintools.targetPrefix}ar"
"RANLIB=${stdenv.cc.bintools.targetPrefix}ranlib"
"CC=${stdenv.cc.targetPrefix}gcc"
];
postInstall = optionalString pythonSupport ''
wrapProgram $out/bin/ndiff --prefix PYTHONPATH : "$(toPythonPath $out)" --prefix PYTHONPATH : "$PYTHONPATH"
'' + optionalString graphicalSupport ''