sile: make it easier to setup a modified luaEnv when writing documents
This commit is contained in:
parent
9a68795314
commit
7edacad9b7
@ -110,41 +110,48 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
luaEnv = lua.withPackages (
|
||||
ps:
|
||||
with ps;
|
||||
# Use this passthru variable to add packages to your lua environment. Use
|
||||
# something like this in your development environment:
|
||||
#
|
||||
# myLuaEnv = lua.withPackages (
|
||||
# ps: lib.attrVals (sile.passthru.luaPackages ++ [
|
||||
# "lua-cjson"
|
||||
# "lua-resty-http"
|
||||
# ]) ps
|
||||
# )
|
||||
luaPackages =
|
||||
[
|
||||
cassowary
|
||||
cldr
|
||||
fluent
|
||||
linenoise
|
||||
loadkit
|
||||
lpeg
|
||||
lua-zlib
|
||||
lua_cliargs
|
||||
luaepnf
|
||||
luaexpat
|
||||
luafilesystem
|
||||
luarepl
|
||||
luasec
|
||||
luasocket
|
||||
luautf8
|
||||
penlight
|
||||
vstruct
|
||||
"cassowary"
|
||||
"cldr"
|
||||
"fluent"
|
||||
"linenoise"
|
||||
"loadkit"
|
||||
"lpeg"
|
||||
"lua-zlib"
|
||||
"lua_cliargs"
|
||||
"luaepnf"
|
||||
"luaexpat"
|
||||
"luafilesystem"
|
||||
"luarepl"
|
||||
"luasec"
|
||||
"luasocket"
|
||||
"luautf8"
|
||||
"penlight"
|
||||
"vstruct"
|
||||
# lua packages needed for testing
|
||||
busted
|
||||
luacheck
|
||||
"busted"
|
||||
"luacheck"
|
||||
# packages needed for building api docs
|
||||
ldoc
|
||||
"ldoc"
|
||||
# NOTE: Add lua packages here, to change the luaEnv also read by `flake.nix`
|
||||
]
|
||||
++ lib.optionals (lib.versionOlder lua.luaversion "5.2") [
|
||||
bit32
|
||||
"bit32"
|
||||
]
|
||||
++ lib.optionals (lib.versionOlder lua.luaversion "5.3") [
|
||||
compat53
|
||||
]
|
||||
);
|
||||
"compat53"
|
||||
];
|
||||
luaEnv = lua.withPackages (ps: lib.attrVals finalAttrs.finalPackage.passthru.luaPackages ps);
|
||||
|
||||
# Copied from Makefile.am
|
||||
tests.test = lib.optionalAttrs (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) (
|
||||
|
Loading…
Reference in New Issue
Block a user