ngrep: fix build due to new libpcap, use debian patches

+22 -3
+22 -3
pkgs/tools/networking/ngrep/default.nix
··· 1 - { stdenv, fetchurl, libpcap, gnumake3 }: 1 + { stdenv, fetchurl, fetchpatch, libpcap, gnumake3, pcre }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "ngrep-1.45"; ··· 8 8 sha256 = "19rg8339z5wscw877mz0422wbsadds3mnfsvqx3ihy58glrxv9mf"; 9 9 }; 10 10 11 - buildInputs = [ gnumake3 libpcap ]; 11 + patches = [ 12 + (fetchpatch { 13 + url = "https://anonscm.debian.org/cgit/users/rfrancoise/ngrep.git/plain/debian/patches/10_debian-build.diff?h=debian/1.45.ds2-14"; 14 + sha256 = "1p359k54xjbh6r0d0lv1l679n250wxk6j8yyz23gn54kwdc29zfy"; 15 + }) 16 + (fetchpatch { 17 + url = "https://anonscm.debian.org/cgit/users/rfrancoise/ngrep.git/plain/debian/patches/10_man-fixes.diff?h=debian/1.45.ds2-14"; 18 + sha256 = "1b66zfbsrsvg60j988i6ga9iif1c34fsbq3dp1gi993xy4va8m5k"; 19 + }) 20 + (fetchpatch { 21 + url = "https://anonscm.debian.org/cgit/users/rfrancoise/ngrep.git/plain/debian/patches/20_setlocale.diff?h=debian/1.45.ds2-14"; 22 + sha256 = "16xbmnmvw5sjidz2qhay68k3xad05g74nrccflavxbi0jba52fdq"; 23 + }) 24 + (fetchpatch { 25 + url = "https://anonscm.debian.org/cgit/users/rfrancoise/ngrep.git/plain/debian/patches/40_ipv6-offsets.diff?h=debian/1.45.ds2-14"; 26 + sha256 = "0fjlk1sav5nnjapvsa8mvdwjkhgm3kgc6dw7r9h1qx6d3b8cgl76"; 27 + }) 28 + ]; 29 + 30 + buildInputs = [ gnumake3 libpcap pcre ]; 12 31 13 32 preConfigure = '' 14 33 # Fix broken test for BPF header file 15 34 sed -i "s|BPF=.*|BPF=${libpcap}/include/pcap/bpf.h|" configure 16 35 17 - configureFlags="$configureFlags --with-pcap-includes=${libpcap}/include" 36 + configureFlags="$configureFlags --enable-ipv6 --enable-pcre --disable-pcap-restart --with-pcap-includes=${libpcap}/include" 18 37 ''; 19 38 20 39 meta = with stdenv.lib; {