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.
This commit is contained in:
Doron Behar
2026-02-22 12:43:11 +02:00
parent df2497093a
commit a486bc63cd
2 changed files with 0 additions and 7 deletions
@@ -9,6 +9,5 @@
makeSetupHook {
name = "wrap-lua-hook";
propagatedBuildInputs = [ makeWrapper ];
substitutions.executable = lua.interpreter;
substitutions.lua = lua;
} ./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)