rewrite run-liminix-vm as a fennel program

the effect of shell quoting/word splitting rules was reaching
completely unreasonable, insofar as I was unable to reason about it
This commit is contained in:
Daniel Barlow
2023-12-03 22:51:39 +00:00
parent cb6ebbdc60
commit 98d3336926
5 changed files with 138 additions and 91 deletions

View File

@@ -27,6 +27,7 @@ name :
echo "#!${lua}/bin/lua ${luaFlags}"
echo "package.path = ${lib.strings.escapeShellArg (builtins.concatStringsSep "" luapath)} .. package.path"
echo "package.cpath = ${lib.strings.escapeShellArg (builtins.concatStringsSep "" luacpath)} .. package.cpath"
echo "require('posix.stdlib').setenv('PATH',${lib.escapeShellArg (lib.makeBinPath packages)} .. \":\" .. os.getenv('PATH'))"
fennel ${if correlate then "--correlate" else ""} --compile ${source}
) > ${name}.lua
'';