libpcap: prefer patch over sed, fetch it and mention upstream PR
This commit is contained in:
parent
7bf70fe520
commit
4934e2b779
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, flex, bison }:
|
{ stdenv, fetchurl, fetchpatch, flex, bison }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libpcap-1.9.0";
|
name = "libpcap-1.9.0";
|
||||||
@ -25,11 +25,16 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace configure --replace " -arch i386" ""
|
substituteInPlace configure --replace " -arch i386" ""
|
||||||
'' + ''
|
|
||||||
sed -i '1i#include <limits.h>' pcap-usb-linux.c
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preInstall = ''mkdir -p $out/bin'';
|
patches = [
|
||||||
|
# https://github.com/the-tcpdump-group/libpcap/pull/735
|
||||||
|
(fetchpatch {
|
||||||
|
name = "add-missing-limits-h-include-pr735.patch";
|
||||||
|
url = https://github.com/the-tcpdump-group/libpcap/commit/aafa3512b7b742f5e66a5543e41974cc5e7eebfa.patch;
|
||||||
|
sha256 = "05zb4hx9g24gx07bi02rprk2rn7fdc1ss3249dv5x36qkasnfhvf";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://www.tcpdump.org;
|
homepage = https://www.tcpdump.org;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user