libpcap: support static build
This commit is contained in:
parent
8d4bc5c029
commit
ee6ca494d2
@ -1,4 +1,6 @@
|
|||||||
{ stdenv, fetchurl, flex, bison }:
|
{ stdenv, fetchurl, flex, bison
|
||||||
|
, enableStatic ? false
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libpcap-1.7.4";
|
name = "libpcap-1.7.4";
|
||||||
@ -13,9 +15,10 @@ stdenv.mkDerivation rec {
|
|||||||
# We need to force the autodetection because detection doesn't
|
# We need to force the autodetection because detection doesn't
|
||||||
# work in pure build enviroments.
|
# work in pure build enviroments.
|
||||||
configureFlags =
|
configureFlags =
|
||||||
if stdenv.isLinux then [ "--with-pcap=linux" ]
|
(if stdenv.isLinux then [ "--with-pcap=linux" ]
|
||||||
else if stdenv.isDarwin then [ "--with-pcap=bpf" ]
|
else if stdenv.isDarwin then [ "--with-pcap=bpf" ]
|
||||||
else [];
|
else [])
|
||||||
|
++ stdenv.lib.optional enableStatic "--enable-static";
|
||||||
|
|
||||||
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace configure --replace " -arch i386" ""
|
substituteInPlace configure --replace " -arch i386" ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user