diff --git a/pkgs/tools/networking/hping/default.nix b/pkgs/tools/networking/hping/default.nix index 33663a44d2a9..11a8cad05b9c 100644 --- a/pkgs/tools/networking/hping/default.nix +++ b/pkgs/tools/networking/hping/default.nix @@ -28,6 +28,13 @@ stdenv.mkDerivation rec { '' + lib.optionalString stdenv.isLinux '' sed -i -e 's|#include |#include |' \ libpcap_stuff.c script.c + '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' + substituteInPlace configure --replace 'BYTEORDER=`./byteorder -m`' BYTEORDER=${ + { + littleEndian = "__LITTLE_ENDIAN_BITFIELD"; + bigEndian = "__BIG_ENDIAN_BITFIELD"; + }.${stdenv.hostPlatform.parsed.cpu.significantByte.name}} + substituteInPlace Makefile.in --replace './hping3 -v' "" ''; configureFlags = [ (if withTcl then "TCLSH=${tcl}/bin/tclsh" else "--no-tcl") ];