According to this:
Not really without modifying the formula file.
if your local archive is pre-build file, aka 'bottle' in Brew.
Here is what I dig out:
The brew bottle is MacOS version-related.
Take pkg-config for example.
here on https://bintray.com/homebrew/bottles/pkg-config#files/, it lists different files for different MacOS version.
After downloading the correct file, you need to move it to correct path which can be generated by
brew --cache --force-bottle pkg-config
for 10.14: it's like:
for 10.13: it's like:
after that, brew can find the cached local file when you run
brew install pkg-config. otherwise, it will still download from a URL.
just move file to $(brew --cache) won't work anymore, at least for today's brew( 2.19 version in my case).