2005-11-03 22:41:36 +03:00
|
|
|
{stdenv, fetchurl, flex, bison}:
|
|
|
|
|
2008-09-01 17:00:24 +04:00
|
|
|
stdenv.mkDerivation rec {
|
2009-02-12 23:28:01 +03:00
|
|
|
name = "libpcap-1.0.0";
|
2005-11-03 22:41:36 +03:00
|
|
|
src = fetchurl {
|
2008-09-01 17:00:24 +04:00
|
|
|
url = [
|
|
|
|
"mirror://tcpdump/release/${name}.tar.gz"
|
|
|
|
"http://www.sfr-fresh.com/unix/misc/${name}.tar.gz"
|
|
|
|
];
|
2009-02-12 23:28:01 +03:00
|
|
|
sha256 = "1h3kmj485qz1i08xs4sc3a0bmhs1rvq0h7gycs7paap2szhw8552";
|
2005-11-03 22:41:36 +03:00
|
|
|
};
|
|
|
|
buildInputs = [flex bison];
|
2009-02-12 23:28:01 +03:00
|
|
|
configureFlags = [
|
|
|
|
"${if stdenv.system == "i686-linux" then "--with-pcap=linux" else ""}"
|
|
|
|
"--with-pcap=linux"
|
|
|
|
];
|
|
|
|
|
|
|
|
preInstall = ''ensureDir $out/bin'';
|
|
|
|
patches = if stdenv.system == "i686-linux"
|
|
|
|
then []
|
|
|
|
else [ ./libpcap_amd64.patch ];
|
|
|
|
|
2005-11-03 22:41:36 +03:00
|
|
|
}
|