When you have multiple lua installations, installing libraries for one of those using luarocks:
luarocks --lua-dir=/usr/local/opt/lua@5.1 install say
To install into a custom location, use the --tree /dir/locn
option
mkdir -p lenv
luarocks install --tree lenv fennel
Further exploration:
requirements.txt
? – A rockspec
. See Creating a rock