Install lua5.1 on MacOS
Ref: https://stackoverflow.com/questions/73586208/can-you-install-disabled-homebrew-packages
By default homebrew-core is not tapped anymore. This is needed for brew edit to work though. Thus this small addition to the other answers.
Tap homebrew-core:
brew tap homebrew/core --force
Edit the formula with:
Remove the line:
disable! date: "2022-07-31", because: :unmaintained
And install it with:
HOMEBREW_NO_INSTALL_FROM_API=1 brew install lua@5.1
If you don’t plan to edit more packages, untap and free the space from tap again (~1Gb):