# Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install luajit # not strictly needed
brew install wget
# lua 5.1.5
wget https://www.lua.org/ftp/lua-5.1.5.tar.gz
tar xvf lua-5.1.5.tar.gz
cd lua-5.1.5
make macosx
sudo make install
cd ..
# luarocks 3.5.0
wget https://luarocks.org/releases/luarocks-3.5.0.tar.gz
tar xvf luarocks-3.5.0.tar.gz
cd luarocks-3.5.0
./configure
make
sudo make install
# these are just things I want
luarocks install moonscript
luarocks install htmlparser
luarocks install lua-cjson
brew tap openresty/brew
brew install openresty
# this stupid-long line is a requirement for lapis
# (for some reason, the way Homebrew installs OpenSSL isn't compatible without this)
luarocks install luaossl OPENSSL_DIR=/usr/local/opt/openssl OPENSSL_INCDIR=/usr/local/opt/openssl/include OPENSSL_LIBDIR=/usr/local/opt/openssl/lib CRYPTO_DIR=/usr/local/opt/openssl CRYPTO_INCDIR=/usr/local/opt/openssl/include
luarocks install lapis
luarocks install lapis-console
# experimental
luarocks install lapis-exceptions
luarocks install --server=https://luarocks.org/dev lapis-community
Comments