From 1e0e8df197429a436d799c470e9684d7f63e3f31 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 8 Nov 2021 13:38:23 +0000 Subject: [PATCH] nftables: add option to disable interactive I think "CLI" is a very strange name for this, but that's what upstream calls it. --- pkgs/os-specific/linux/nftables/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/nftables/default.nix b/pkgs/os-specific/linux/nftables/default.nix index f91dc84d2187..e84d6aa6ac5c 100644 --- a/pkgs/os-specific/linux/nftables/default.nix +++ b/pkgs/os-specific/linux/nftables/default.nix @@ -1,9 +1,10 @@ { lib, stdenv, fetchurl, pkg-config, bison, flex , asciidoc, libxslt, findXMLCatalogs, docbook_xml_dtd_45, docbook_xsl , libmnl, libnftnl, libpcap -, gmp, jansson, libedit +, gmp, jansson , autoreconfHook , withDebugSymbols ? false +, withCli ? true, libedit , withPython ? false, python3 , withXtables ? true, iptables , nixosTests @@ -26,8 +27,9 @@ stdenv.mkDerivation rec { buildInputs = [ libmnl libnftnl libpcap - gmp jansson libedit - ] ++ lib.optional withXtables iptables + gmp jansson + ] ++ lib.optional withCli libedit + ++ lib.optional withXtables iptables ++ lib.optionals withPython [ python3 python3.pkgs.setuptools @@ -35,7 +37,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-json" - "--with-cli=editline" + (lib.withFeatureAs withCli "cli" "editline") ] ++ lib.optional (!withDebugSymbols) "--disable-debug" ++ lib.optional (!withPython) "--disable-python" ++ lib.optional withPython "--enable-python"