2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, bison, flex
|
2020-04-24 23:36:52 +00:00
|
|
|
, asciidoc, libxslt, findXMLCatalogs, docbook_xml_dtd_45, docbook_xsl
|
|
|
|
, libmnl, libnftnl, libpcap
|
2022-04-15 01:41:22 +00:00
|
|
|
, gmp, jansson, libedit
|
2022-06-16 17:23:12 +00:00
|
|
|
, autoreconfHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, withDebugSymbols ? false
|
|
|
|
, withPython ? false , python3
|
2021-12-06 16:07:01 +00:00
|
|
|
, withXtables ? true , iptables
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.0.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "nftables";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.bz2";
|
2022-09-09 14:08:57 +00:00
|
|
|
hash = "sha256-jRtLGDk69DaY0QuqJdK5tjl5ab7srHgWw13QcU5N5Qo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-04-15 01:41:22 +00:00
|
|
|
autoreconfHook
|
2022-06-16 17:23:12 +00:00
|
|
|
pkg-config bison flex
|
2020-11-21 19:51:51 +00:00
|
|
|
asciidoc docbook_xml_dtd_45 docbook_xsl findXMLCatalogs libxslt
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libmnl libnftnl libpcap
|
2022-04-15 01:41:22 +00:00
|
|
|
gmp jansson libedit
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optional withXtables iptables
|
|
|
|
++ lib.optional withPython python3;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-json"
|
2022-04-15 01:41:22 +00:00
|
|
|
"--with-cli=editline"
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optional (!withDebugSymbols) "--disable-debug"
|
|
|
|
++ lib.optional (!withPython) "--disable-python"
|
|
|
|
++ lib.optional withPython "--enable-python"
|
|
|
|
++ lib.optional withXtables "--with-xtables";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The project that aims to replace the existing {ip,ip6,arp,eb}tables framework";
|
|
|
|
homepage = "https://netfilter.org/projects/nftables/";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ izorkin ajs124 ];
|
2022-11-04 12:27:35 +00:00
|
|
|
mainProgram = "nft";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|