hping: fix cross

hping tries to run a compiled binary to detect endianness, and also
runs the end-product of the build process with `-v` for some reason
after the build completes.

This commit addresses both of these behaviors.

Tested on:
- [x] mips64el-linux-gnu (cross from x86_64-linux)
- [x] aarch64-linux-gnu (cross from x86_64-linux)

+7
+7
pkgs/tools/networking/hping/default.nix
··· 28 28 '' + lib.optionalString stdenv.isLinux '' 29 29 sed -i -e 's|#include <net/bpf.h>|#include <pcap/bpf.h>|' \ 30 30 libpcap_stuff.c script.c 31 + '' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 32 + substituteInPlace configure --replace 'BYTEORDER=`./byteorder -m`' BYTEORDER=${ 33 + { 34 + littleEndian = "__LITTLE_ENDIAN_BITFIELD"; 35 + bigEndian = "__BIG_ENDIAN_BITFIELD"; 36 + }.${stdenv.hostPlatform.parsed.cpu.significantByte.name}} 37 + substituteInPlace Makefile.in --replace './hping3 -v' "" 31 38 ''; 32 39 33 40 configureFlags = [ (if withTcl then "TCLSH=${tcl}/bin/tclsh" else "--no-tcl") ];