diff --git a/pkgs/write-fennel/default.nix b/pkgs/write-fennel/default.nix index 64b16bc..25be271 100644 --- a/pkgs/write-fennel/default.nix +++ b/pkgs/write-fennel/default.nix @@ -31,6 +31,7 @@ stdenv.mkDerivation { echo "#!${lua}/bin/lua ${luaFlags}" echo "package.path = ${lib.strings.escapeShellArg (concatStringsSep "" luapath)} .. package.path" echo "package.cpath = ${lib.strings.escapeShellArg (concatStringsSep "" luacpath)} .. package.cpath" + echo "local ok, stdlib = pcall(require,'posix.stdlib'); if ok then stdlib.setenv('PATH',${lib.escapeShellArg (lib.makeBinPath packages)} .. \":\" .. os.getenv('PATH')) end" echo "local ok, ll = pcall(require,'lualinux'); if ok then ll.setenv('PATH',${lib.escapeShellArg (lib.makeBinPath packages)} .. \":\" .. os.getenv('PATH')) end" fennel ${if macropath != "" then "--add-macro-path ${lib.strings.escapeShellArg macropath}" else ""} ${if correlate then "--correlate" else ""} --compile ${source} ) > ${name}.lua