From 385a6721be3a5ee7bd098ea041ec6076bcabf73d Mon Sep 17 00:00:00 2001 From: Marc Jakobi Date: Thu, 26 Mar 2026 16:38:25 +0100 Subject: [PATCH] buildLuarocksPackage: fix wrapping lua package binaries --- pkgs/development/interpreters/lua-5/wrap.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/lua-5/wrap.sh b/pkgs/development/interpreters/lua-5/wrap.sh index 47b82279c17c..13d6dd6c625c 100644 --- a/pkgs/development/interpreters/lua-5/wrap.sh +++ b/pkgs/development/interpreters/lua-5/wrap.sh @@ -31,13 +31,15 @@ wrapLuaProgramsIn() { if head -n1 "$f" | grep -q '#!.*'; then # Cross-compilation hack: exec '/nix/store/...-lua-.../bin/lua' execute # the host lua + # NOTE: We don't --replace-fail, because this hook is also used + # on Lua packages' wrapped binaries. substituteInPlace "$f" \ - --replace-fail "@luaBuild@" "@luaHost@" + --replace-quiet "@luaBuild@" "@luaHost@" # Build platform's Luarocks writes scripts that reference luarocks # itself in them, so we fix these references to reference the host # platform's luarocks. substituteInPlace "$f" \ - --replace-fail "@luarocksBuild@" "@luarocksHost@" + --replace-quiet "@luarocksBuild@" "@luarocksHost@" fi # wrapProgram creates the executable shell script described @@ -60,7 +62,7 @@ wrapLuaProgramsIn() { # Same as above, but now for the wrapper script substituteInPlace "$f" \ - --replace-fail "@luarocksBuild@" "@luarocksHost@" + --replace-quiet "@luarocksBuild@" "@luarocksHost@" done }