nixpkgs/pkgs/os-specific/linux/nftables/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.4 KiB
Nix
Raw Normal View History

2022-05-31 12:35:57 +00:00
{ lib, stdenv, fetchurl, pkg-config, bison, flex
2019-11-13 06:12:59 +00:00
, asciidoc, libxslt, findXMLCatalogs, docbook_xml_dtd_45, docbook_xsl
2019-08-18 17:14:48 +00:00
, libmnl, libnftnl, libpcap
2022-02-21 17:46:50 +00:00
, gmp, jansson, libedit
2022-05-31 12:35:57 +00:00
, autoreconfHook
2019-11-13 09:52:54 +00:00
, withDebugSymbols ? false
, withPython ? false , python3
, withXtables ? true , iptables
2019-08-18 17:14:48 +00:00
}:
2014-08-23 23:16:06 +00:00
stdenv.mkDerivation rec {
version = "1.0.5";
pname = "nftables";
2014-08-23 23:16:06 +00:00
src = fetchurl {
url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.bz2";
hash = "sha256-jRtLGDk69DaY0QuqJdK5tjl5ab7srHgWw13QcU5N5Qo=";
2014-08-23 23:16:06 +00:00
};
2019-11-13 06:12:59 +00:00
nativeBuildInputs = [
2022-02-21 17:46:50 +00:00
autoreconfHook
2022-05-31 12:35:57 +00:00
pkg-config bison flex
2020-10-31 15:38:30 +00:00
asciidoc docbook_xml_dtd_45 docbook_xsl findXMLCatalogs libxslt
2019-11-13 06:12:59 +00:00
];
2014-08-23 23:16:06 +00:00
2019-08-18 17:14:48 +00:00
buildInputs = [
libmnl libnftnl libpcap
2022-02-21 17:46:50 +00:00
gmp jansson libedit
] ++ lib.optional withXtables iptables
++ lib.optional withPython python3;
2019-11-13 09:52:54 +00:00
configureFlags = [
"--with-json"
2022-02-21 17:46:50 +00:00
"--with-cli=editline"
] ++ lib.optional (!withDebugSymbols) "--disable-debug"
++ lib.optional (!withPython) "--disable-python"
++ lib.optional withPython "--enable-python"
++ lib.optional withXtables "--with-xtables";
2014-08-23 23:16:06 +00:00
meta = with lib; {
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/";
license = licenses.gpl2Only;
2014-08-23 23:16:06 +00:00
platforms = platforms.linux;
2021-11-18 13:58:15 +00:00
maintainers = with maintainers; [ izorkin ajs124 ];
2014-08-23 23:16:06 +00:00
};
}