2019-08-18 17:14:48 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, bison, flex
|
|
|
|
, libmnl, libnftnl, libpcap
|
|
|
|
, gmp, jansson, readline
|
|
|
|
, withXtables ? false , iptables
|
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2014-08-23 23:16:06 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-20 06:28:56 +00:00
|
|
|
version = "0.9.2";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "nftables";
|
2014-08-23 23:16:06 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.bz2";
|
2019-08-20 06:28:56 +00:00
|
|
|
sha256 = "1x8kalbggjq44j4916i6vyv1rb20dlh1dcsf9xvzqsry2j063djw";
|
2014-08-23 23:16:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
2019-08-18 17:14:48 +00:00
|
|
|
"--disable-man-doc"
|
|
|
|
"--with-json"
|
|
|
|
] ++ optional withXtables "--with-xtables";
|
2014-08-23 23:16:06 +00:00
|
|
|
|
2019-08-18 17:14:48 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig bison flex ];
|
2014-08-23 23:16:06 +00:00
|
|
|
|
2019-08-18 17:14:48 +00:00
|
|
|
buildInputs = [
|
|
|
|
libmnl libnftnl libpcap
|
|
|
|
gmp readline jansson
|
|
|
|
] ++ optional withXtables iptables;
|
2014-08-23 23:16:06 +00:00
|
|
|
|
2019-08-18 17:14:48 +00:00
|
|
|
meta = {
|
2016-06-20 10:53:46 +00:00
|
|
|
description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
|
2019-08-18 17:14:48 +00:00
|
|
|
homepage = "https://netfilter.org/projects/nftables/";
|
2014-08-23 23:16:06 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|