From d4afbfa92869dc28185a7d2742f81ac45e9df87f Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 8 Nov 2021 13:38:23 +0000 Subject: 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 0b6291226bc..834394b8890 100644 --- a/pkgs/os-specific/linux/nftables/default.nix +++ b/pkgs/os-specific/linux/nftables/default.nix @@ -1,8 +1,9 @@ { lib, stdenv, fetchurl, pkg-config, bison, file, flex , asciidoc, libxslt, findXMLCatalogs, docbook_xml_dtd_45, docbook_xsl , libmnl, libnftnl, libpcap -, gmp, jansson, readline +, gmp, jansson , withDebugSymbols ? false +, withCli ? true, readline , withPython ? false , python3 , withXtables ? true , iptables }: @@ -25,8 +26,9 @@ stdenv.mkDerivation rec { buildInputs = [ libmnl libnftnl libpcap - gmp jansson readline - ] ++ optional withXtables iptables + gmp jansson + ] ++ optional withCli readline + ++ optional withXtables iptables ++ optional withPython python3; preConfigure = '' @@ -35,7 +37,7 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-json" - "--with-cli=readline" # TODO: maybe switch to editline + (lib.withFeatureAs withCli "cli" "readline") ] ++ optional (!withDebugSymbols) "--disable-debug" ++ optional (!withPython) "--disable-python" ++ optional withPython "--enable-python" -- cgit 1.4.1