forked from DGNum/liminix
fennelrepl look for .fnl before .lua
this means fennelrepl in nix-shell will prefer local source files to generated lua files, making it easier to change library code without restarting the shell
This commit is contained in:
parent
9dd3cf23b4
commit
0312f7a999
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@ in writeScriptBin "fennelrepl" ''
|
||||||
package.path = ${lib.strings.escapeShellArg luapath} .. ";" .. package.path
|
package.path = ${lib.strings.escapeShellArg luapath} .. ";" .. package.path
|
||||||
package.cpath = ${lib.strings.escapeShellArg luacpath} .. ";" .. (package.cpath or "")
|
package.cpath = ${lib.strings.escapeShellArg luacpath} .. ";" .. (package.cpath or "")
|
||||||
local fennel = require "fennel"
|
local fennel = require "fennel"
|
||||||
fennel.install()
|
table.insert(package.loaders or package.searchers,1, fennel.searcher)
|
||||||
|
|
||||||
local more_fennel = os.getenv("FENNEL_PATH")
|
local more_fennel = os.getenv("FENNEL_PATH")
|
||||||
if more_fennel then
|
if more_fennel then
|
||||||
fennel.path = more_fennel .. ";" .. fennel.path
|
fennel.path = more_fennel .. ";" .. fennel.path
|
||||||
|
|
Loading…
Reference in a new issue