Finding BLAS/LAPACK in BinaryBuilder

So I try to compile with BinaryBuilder.jl some binary artifacts which depend on BLAS (via cmake), which is included in Julia and thus should not cause an extra download. What is the right way to indicate this dependency to BinaryBuilder?

Here is an old question on the same topic which was unhelpful: using BuildDependency("OpenBLASBuilder") caused ERROR: LoadError: Invalid dependency specifications! (which is quite unsurprising given that the last commit on that package is 3 years old).

Try the one in Yggdrasil:

https://github.com/JuliaPackaging/Yggdrasil/tree/master/O/OpenBLAS

How would I use this? Adding a simple BuildDependency("OpenBLAS") produces an error (invalid dependency specification). The same happens when using the full URL https://github.com/JuliaPackaging/Yggdrasil/tree/master/O/OpenBLAS, and even adding a .git at the end changes nothing. (And neither BinaryBuilder nor Yggdrasil’s documentation is too clear about this…).

Edit: Oh. BuildDependency("OpenBLAS_jll").

It should be OpenBLAS_jll, not OpenBLAS

You probably want Dependency, not BuildDependency: Building Packages · BinaryBuilder.jl

The easiest way to write build scripts is to follow a similar package, e.g., if you need 32-bit BLAS:
https://github.com/JuliaPackaging/Yggdrasil/blob/0520e94a6894420214e0273f568cd423e1546c11/C/Coin-OR/Ipopt/build_tarballs.jl#L61