2022-05-31 14:35:57 +02:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, bison, flex
|
2019-11-13 07:12:59 +01:00
|
|
|
, asciidoc, libxslt, findXMLCatalogs, docbook_xml_dtd_45, docbook_xsl
|
2019-08-18 19:14:48 +02:00
|
|
|
, libmnl, libnftnl, libpcap
|
2022-02-21 18:46:50 +01:00
|
|
|
, gmp, jansson, libedit
|
2022-05-31 14:35:57 +02:00
|
|
|
, autoreconfHook
|
2019-11-13 10:52:54 +01:00
|
|
|
, withDebugSymbols ? false
|
|
|
|
, withPython ? false , python3
|
2020-02-27 11:47:33 +01:00
|
|
|
, withXtables ? true , iptables
|
2019-08-18 19:14:48 +02:00
|
|
|
}:
|
|
|
|
|
2014-08-24 01:16:06 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2022-12-22 15:16:32 +01:00
|
|
|
version = "1.0.6";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "nftables";
|
2014-08-24 01:16:06 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-12-22 15:16:32 +01:00
|
|
|
url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.xz";
|
|
|
|
hash = "sha256-JAdDDd2CmHZw5I3C/anigLqoMHq+wEqxjWCd89sAXkw=";
|
2014-08-24 01:16:06 +02:00
|
|
|
};
|
|
|
|
|
2019-11-13 07:12:59 +01:00
|
|
|
nativeBuildInputs = [
|
2022-02-21 18:46:50 +01:00
|
|
|
autoreconfHook
|
2022-05-31 14:35:57 +02:00
|
|
|
pkg-config bison flex
|
2020-10-31 16:38:30 +01:00
|
|
|
asciidoc docbook_xml_dtd_45 docbook_xsl findXMLCatalogs libxslt
|
2019-11-13 07:12:59 +01:00
|
|
|
];
|
2014-08-24 01:16:06 +02:00
|
|
|
|
2019-08-18 19:14:48 +02:00
|
|
|
buildInputs = [
|
|
|
|
libmnl libnftnl libpcap
|
2022-02-21 18:46:50 +01:00
|
|
|
gmp jansson libedit
|
2022-04-30 02:04:02 +02:00
|
|
|
] ++ lib.optional withXtables iptables
|
|
|
|
++ lib.optional withPython python3;
|
2019-11-13 10:52:54 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-json"
|
2022-02-21 18:46:50 +01:00
|
|
|
"--with-cli=editline"
|
2022-04-30 02:04:02 +02:00
|
|
|
] ++ lib.optional (!withDebugSymbols) "--disable-debug"
|
|
|
|
++ lib.optional (!withPython) "--disable-python"
|
|
|
|
++ lib.optional withPython "--enable-python"
|
|
|
|
++ lib.optional withXtables "--with-xtables";
|
2014-08-24 01:16:06 +02:00
|
|
|
|
2022-04-30 02:04:02 +02:00
|
|
|
meta = with lib; {
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
|
2019-08-18 19:14:48 +02:00
|
|
|
homepage = "https://netfilter.org/projects/nftables/";
|
2021-11-08 14:37:46 +01:00
|
|
|
license = licenses.gpl2Only;
|
2014-08-24 01:16:06 +02:00
|
|
|
platforms = platforms.linux;
|
2021-11-18 14:58:15 +01:00
|
|
|
maintainers = with maintainers; [ izorkin ajs124 ];
|
2022-11-06 20:36:43 +01:00
|
|
|
mainProgram = "nft";
|
2014-08-24 01:16:06 +02:00
|
|
|
};
|
|
|
|
}
|