Fennel is currently packaged & maintained on the following systems: (If you're aware of others, please add them herein!)
luaPackages.fennel
Luarocks is somewhat special in that it be used on many different operating systems. Once you've installed Luarocks, you can install Fennel by:
~/.luarocks/bin
directory is added to your shell's $PATH
.luarocks --local install fennel
to install for your user.fennel --help
to confirm the installation succeeded.See the LuaRocks path docs for more information.
Fennel can be distributed as a compiled binary, or as a single-file Lua script. It's up to the person packaging to decide which makes more sense in context, but the main advantage of the binary is that it does not depend on having Lua installed on the box, and in the context of a package manager this is usually not particularly relevant.
One of the following: lua5.1, lua5.2, lua5.3, lua5.4, or luajit
You will need the dev headers for whatever Lua implementation it depends on if you decide to build Fennel as a compiled binary instead of a Lua script. For a Lua script simply depending on a Lua implementation is enough.
Simply invoke the following in your build form:
make fennel-bin
The Makefile lists the following lua libs and include directory; the defaults
are Debian-specific, but overrides can be passed in as arguments to make
.
STATIC_LUA_LIB ?= /usr/lib/x86_64-linux-gnu/liblua5.3.a
LUA_INCLUDE_DIR ?= /usr/include/lua5.3
For instance, on Alpine:
make fennel-bin STATIC_LUA_LIB=/usr/lib/liblua-5.3.so.0.0.0 LUA_INCLUDE_DIR=/usr/include/lua5.3
Otherwise compilation on glibc and musl libc systems is the same.
Simply invoke the following in your build form
make fennel LUA=lua5.3 # or whichever Lua executable you prefer
The following files should be accounted for in the Fennel package:
fennel
: the executablefennel.1
: the man pagefennel.lua
: the compiler, as a Lua libraryYou can run sudo make install
to handle installing these three,
though you might want to override DESTDIR
or PREFIX
.