lz.n: wrap lua code in function

This commit is contained in:
Ching Pei Yang 2024-08-03 19:46:52 +02:00 committed by Pei Yang Ching
parent 88de04e94c
commit 11dca73b37

View file

@ -31,6 +31,15 @@
(removeAttrs spec ["package" "setupModule" "setupOpts" "keys"]) (removeAttrs spec ["package" "setupModule" "setupOpts" "keys"])
// { // {
"@1" = name; "@1" = name;
before =
if spec.before != null
then
mkLuaInline ''
function()
${spec.before}
end
''
else null;
after = mkLuaInline '' after = mkLuaInline ''
function() function()
${ ${