nixfmt-rfc-style

There is nothing in this commit except for the changes made by
nix-shell -p nixfmt-rfc-style --run "nixfmt ."

If this has mucked up your open branches then sorry about that. You
can probably nixfmt them to match before merging
This commit is contained in:
Daniel Barlow
2025-02-10 21:55:08 +00:00
parent 13cc5a8992
commit 7e2b0068e6
211 changed files with 6049 additions and 4355 deletions

View File

@@ -18,10 +18,9 @@ let
f: "${f}/share/lua/${lua.luaversion}/?.lua;" + "${f}/share/lua/${lua.luaversion}/?/init.lua;"
) packages;
luacpath = map (f: "${f}/lib/lua/${lua.luaversion}/?.so;") packages;
macropath = concatStringsSep ";"
(map (f: "${f}/share/lua/${lua.luaversion}/?.fnl") macros);
macropath = concatStringsSep ";" (map (f: "${f}/share/lua/${lua.luaversion}/?.fnl") macros);
luaFlags = lib.optionalString (mainFunction != null) "-e dofile(arg[0]).${mainFunction}()";
quoteString = string : "'${replaceStrings ["'"] ["'\\''"] string}'";
quoteString = string: "'${replaceStrings [ "'" ] [ "'\\''" ] string}'";
in
stdenv.mkDerivation {
inherit name;
@@ -34,7 +33,9 @@ stdenv.mkDerivation {
echo "package.cpath = ${quoteString (concatStringsSep "" luacpath)} .. package.cpath"
echo "local ok, stdlib = pcall(require,'posix.stdlib'); if ok then stdlib.setenv('PATH',${quoteString (lib.makeBinPath packages)} .. \":\" .. os.getenv('PATH')) end"
echo "local ok, ll = pcall(require,'lualinux'); if ok then ll.setenv('PATH',${quoteString (lib.makeBinPath packages)} .. \":\" .. os.getenv('PATH')) end"
fennel ${if macropath != "" then "--add-macro-path ${quoteString macropath}" else ""} ${if correlate then "--correlate" else ""} --compile ${source}
fennel ${if macropath != "" then "--add-macro-path ${quoteString macropath}" else ""} ${
if correlate then "--correlate" else ""
} --compile ${source}
) > ${name}.lua
'';