export ARCHFLAGS='-arch arm64'
brew install -s --HEAD pkg_name_here
Nothing else needed. Honestly, the `--HEAD` part may not even be needed anymore.
Realize the problem with homebrew isn't brew itself right now on the M1. I have absolutely zero doubt (go read the issues) the maintainers want to support it properly and be done with this kind of noise. The reason they can't or don't is because a lot of shit is broken still. They can't safely let you go all willis-nillis installing ARM packages because they're broken.
Installing stuff from source, yourself, isn't hard if it's going to actually work... 99% of it boils down to:
1. git clone whatever_it_is 2. ./configure --prefix=/usr/local/bin 3. make 4. make install