File tree 3 files changed +28
-14
lines changed
3 files changed +28
-14
lines changed Original file line number Diff line number Diff line change 3
3
\title {lualatex}
4
4
\begin {document }
5
5
6
- \directlua {require'prompt.tex'}
6
+ \directlua {
7
+ % FIXME: lualatex needs it to search prompt.tex
8
+ kpse.set_program_name(status.list().luatex_engine)
9
+ require'prompt.tex'
10
+ }
7
11
8
12
\end {document }
Original file line number Diff line number Diff line change 1
1
-- luacheck: ignore 111 113
2
2
--- @diagnostic disable : undefined-global
3
+ -- FIXME: for security if you forget add it to `\directlua{}` for lualatex
3
4
kpse .set_program_name (status .list ().luatex_engine )
4
5
local prompt = require ' prompt'
5
6
local utils = require " prompt.utils"
Original file line number Diff line number Diff line change 3
3
} :
4
4
5
5
with pkgs ;
6
+ let
7
+ packages = (
8
+ p : with p ; [
9
+ ansicolors
10
+ argparse
11
+ luafilesystem
12
+ luaprompt
13
+
14
+ busted
15
+ ldoc
16
+ ]
17
+ ) ;
18
+ in
6
19
mkShell rec {
7
20
name = "prompt-style.lua" ;
8
21
buildInputs = [
9
- ( lua5_3 . withPackages (
10
- p : with p ; [
11
- ansicolors
12
- argparse
13
- luafilesystem
14
- luaprompt
15
-
16
- busted
17
- ldoc
18
- ]
19
- ) )
22
+ ( lua5_3 . withPackages packages )
23
+ ( luajit . withPackages packages )
20
24
] ;
21
25
shellHook = ''
22
- export LUAINPUTS_luatex='lua;${ builtins . elemAt buildInputs 0 } /share/lua/5.3'
23
- export CLUAINPUTS_luatex='${ builtins . elemAt buildInputs 0 } /lib/lua/5.3'
26
+ export LUAINPUTS_luatex="lua;${ builtins . elemAt buildInputs 0 } /share/lua/5.3"
27
+ export CLUAINPUTS_luatex="${ builtins . elemAt buildInputs 0 } /lib/lua/5.3"
28
+ export LUAINPUTS_luajittex="lua;${ builtins . elemAt buildInputs 1 } /share/lua/5.1"
29
+ export CLUAINPUTS_luajittex="${ builtins . elemAt buildInputs 1 } /lib/lua/5.1"
30
+
24
31
export LUAINPUTS_luahbtex="$LUAINPUTS_luatex"
25
32
export CLUAINPUTS_luahbtex="$CLUAINPUTS_luatex"
33
+ export LUAINPUTS_luajithbtex="$LUAINPUTS_luajittex"
34
+ export CLUAINPUTS_luajithbtex="$CLUAINPUTS_luajittex"
26
35
'' ;
27
36
}
You can’t perform that action at this time.
0 commit comments