Merge pull request #267143 from amjoseph-nixpkgs/pr/hping/fixcross

hping: fix cross
This commit is contained in:
Rick van Schijndel 2023-12-06 22:16:30 +01:00 committed by GitHub
commit ff2fecf05a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,13 @@ stdenv.mkDerivation rec {
'' + lib.optionalString stdenv.isLinux ''
sed -i -e 's|#include <net/bpf.h>|#include <pcap/bpf.h>|' \
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") ];