From a486bc63cd04736ac2df72566510189f4630ad88 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Sun, 22 Feb 2026 12:43:11 +0200 Subject: [PATCH] lua{5_{1,2,3,4},jit}Packages.wrapLua: remove sed that does nothing patchShebangs already takes care of this automatically and does it well, before this hook runs. --- pkgs/development/interpreters/lua-5/wrap-lua.nix | 1 - pkgs/development/interpreters/lua-5/wrap.sh | 6 ------ 2 files changed, 7 deletions(-) diff --git a/pkgs/development/interpreters/lua-5/wrap-lua.nix b/pkgs/development/interpreters/lua-5/wrap-lua.nix index 1f074b04425d..e1c22c8a785f 100644 --- a/pkgs/development/interpreters/lua-5/wrap-lua.nix +++ b/pkgs/development/interpreters/lua-5/wrap-lua.nix @@ -9,6 +9,5 @@ makeSetupHook { name = "wrap-lua-hook"; propagatedBuildInputs = [ makeWrapper ]; - substitutions.executable = lua.interpreter; substitutions.lua = lua; } ./wrap.sh diff --git a/pkgs/development/interpreters/lua-5/wrap.sh b/pkgs/development/interpreters/lua-5/wrap.sh index f6868e6faac5..c939d62e4ec8 100644 --- a/pkgs/development/interpreters/lua-5/wrap.sh +++ b/pkgs/development/interpreters/lua-5/wrap.sh @@ -28,12 +28,6 @@ wrapLuaProgramsIn() { # Find all regular files in the output directory that are executable. find "$dir" -type f -perm -0100 -print0 | while read -d "" f; do - # Rewrite "#! .../env lua" to "#! /nix/store/.../lua". - # Lua to use besides one with this hook anyway. - if head -n1 "$f" | grep -q '#!.*/env.*\(lua\)'; then - sed -i "$f" -e "1 s^.*/env[ ]*\(lua\)[^ ]*^#! @executable@^" - fi - # wrapProgram creates the executable shell script described # above. The script will set LUA_(C)PATH and PATH variables! # (see pkgs/build-support/setup-hooks/make-wrapper.sh)