From 1262d5219d1c203625753d9abba85f0836ba4de6 Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Tue, 26 May 2026 12:02:44 +0200 Subject: [PATCH] frr: fix cross build with lua scripting Make the --enable-scripting optional to allow for minimalized builds and ensure lua is correctly referenced in cross builds. Signed-off-by: Markus Theil (cherry picked from commit bc8afa0d9f419e76c4f5f53e98643690ce25f7a1) --- pkgs/by-name/fr/frr/package.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fr/frr/package.nix b/pkgs/by-name/fr/frr/package.nix index f3caad2e61d6..748f8544ca91 100644 --- a/pkgs/by-name/fr/frr/package.nix +++ b/pkgs/by-name/fr/frr/package.nix @@ -46,6 +46,7 @@ cumulusSupport ? false, irdpSupport ? true, mgmtdSupport ? true, + scriptingSupport ? true, # Experimental as of 10.1, reconsider if upstream changes defaults grpcSupport ? false, @@ -120,7 +121,6 @@ stdenv.mkDerivation (finalAttrs: { python3 readline rtrlib - lua53Packages.lua sqlite ] ++ lib.optionals stdenv.hostPlatform.isLinux [ @@ -135,11 +135,17 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals grpcSupport [ grpc protobuf + ] + ++ lib.optionals scriptingSupport [ + lua53Packages.lua ]; # otherwise in cross-compilation: "configure: error: no working python version found" depsBuildBuild = [ buildPackages.python3 + ] + ++ lib.optionals scriptingSupport [ + buildPackages.lua53Packages.lua ]; # cross-compiling: clippy is compiled with the build host toolchain, split it out to ease @@ -157,7 +163,6 @@ stdenv.mkDerivation (finalAttrs: { "--enable-logfile-mask=0640" "--enable-multipath=${toString numMultipath}" "--enable-config-rollbacks" - "--enable-scripting" "--enable-user=frr" "--enable-vty-group=frrvty" "--localstatedir=/var" @@ -171,6 +176,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.strings.enableFeature irdpSupport "irdp") (lib.strings.enableFeature mgmtdSupport "mgmtd") (lib.strings.enableFeature grpcSupport "grpc") + (lib.strings.enableFeature scriptingSupport "scripting") # routing protocols (lib.strings.enableFeature bgpdSupport "bgpd")