nftables: fix static build

This commit is contained in:
Ihar Hrachyshka
2025-09-08 19:08:01 -04:00
parent 252726f4b7
commit 694ac98bd6
+5 -1
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")