nftables: fix static build (#441065)

This commit is contained in:
Yohann Boniface
2025-10-10 01:21:42 +00:00
committed by GitHub

View File

@@ -23,6 +23,7 @@
iptables,
nixosTests,
gitUpdater,
ncurses,
}:
stdenv.mkDerivation rec {
@@ -52,7 +53,8 @@ stdenv.mkDerivation rec {
docbook_xsl
findXMLCatalogs
libxslt
];
]
++ lib.optional stdenv.hostPlatform.isStatic ncurses;
buildInputs = [
libmnl
@@ -64,6 +66,8 @@ stdenv.mkDerivation rec {
++ lib.optional withCli libedit
++ lib.optional withXtables iptables;
env.NIX_LDFLAGS = if stdenv.hostPlatform.isStatic then "-lncursesw" else null;
configureFlags = [
"--with-json"
(lib.withFeatureAs withCli "cli" "editline")