Unverified Commit b7648fa8 authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

nftables: fix static build (#441065)

parents b7eddb7b 694ac98b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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")