post_install() {
	# If Luarocks in installed *after* any other Lua module package, the hook
	# that rebuilds the system manifests won't have fired and hence they will
	# be invisible to luarocks until some other package installation happens to
	# trigger the manifest rebuild. This jump starts the process.
	for LUAVER in 5.{1,2,3,4}; do
		local tree="/usr/lib/luarocks/rocks-$LUAVER/"
		if [[ -d "$tree" ]]; then
			luarocks-admin --lua-version "$LUAVER" make_manifest --local-tree "$tree"
		fi
	done
}
