2019-06-16 21:59:06 +02:00
|
|
|
{ stdenv, fetchurl, bison, flex, pkgconfig, pruneLibtoolFiles
|
2018-11-29 22:44:29 +01:00
|
|
|
, libnetfilter_conntrack, libnftnl, libmnl, libpcap }:
|
2008-08-15 11:49:43 +02:00
|
|
|
|
2009-07-23 20:16:24 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-05-29 00:17:46 +02:00
|
|
|
pname = "iptables";
|
|
|
|
version = "1.8.3";
|
2008-08-15 11:49:43 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-05-29 00:17:46 +02:00
|
|
|
url = "https://www.netfilter.org/projects/${pname}/files/${pname}-${version}.tar.bz2";
|
|
|
|
sha256 = "106xkkg5crsscjlinxvqvprva23fwwqfgrzl8m2nn841841sqg52";
|
2008-08-15 11:49:43 +02:00
|
|
|
};
|
|
|
|
|
2018-12-09 17:12:53 +01:00
|
|
|
nativeBuildInputs = [ bison flex pkgconfig pruneLibtoolFiles ];
|
2016-01-01 02:54:56 +01:00
|
|
|
|
2018-11-29 22:44:29 +01:00
|
|
|
buildInputs = [ libnetfilter_conntrack libnftnl libmnl libpcap ];
|
2016-01-01 02:54:56 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lmnl -lnftnl"
|
|
|
|
'';
|
|
|
|
|
2018-07-25 23:44:21 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-devel"
|
|
|
|
"--enable-shared"
|
2018-11-29 22:44:29 +01:00
|
|
|
"--enable-bpf-compiler"
|
2018-07-25 23:44:21 +02:00
|
|
|
];
|
2010-05-21 00:11:44 +02:00
|
|
|
|
2017-01-22 02:20:00 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2008-08-15 11:49:43 +02:00
|
|
|
description = "A program to configure the Linux IP packet filtering ruleset";
|
2018-11-29 22:44:29 +01:00
|
|
|
homepage = https://www.netfilter.org/projects/iptables/index.html;
|
2017-01-22 02:20:00 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2018-08-30 00:34:22 +02:00
|
|
|
license = licenses.gpl2;
|
2018-11-29 22:44:29 +01:00
|
|
|
downloadPage = "https://www.netfilter.org/projects/iptables/files/";
|
2014-12-12 23:16:48 +01:00
|
|
|
updateWalker = true;
|
|
|
|
inherit version;
|
2008-08-15 11:49:43 +02:00
|
|
|
};
|
|
|
|
}
|