Is there a standard way of overriding BinaryProviders download mechanism and make it use a custom build? I’ve encountered two cases where that would be very valuable:
A custom build is necessary (e.g. I may need to build HDF5 with some specific options for my application).
Not all platform are supported by the standard BinaryBuilder configs, e.g. Julia on Android: Runs fine via its-pointless repository for termux, but it’s very limited since basic packages like Distributions can’t be installed without binary deps).
Assuming I do have a local installation of the binary dependency, in a compatible version, is there any way to tell BinaryProvider to use it? In past, with packages using BinDeps, there was usually a way to do that.
The result of building a package Foo is usually a deps/deps.jl file that defines a const libfoo = "...path to libfoo.so....". So one relatively easy way to point a package at a custom binary is edit/overwrite deps.jl to change the value of this constant. Just do using Foo; pathof(Foo) to find out where the module Foo is installed, and then edit its deps.jl file to use the path of the library that you want (or create a deps.jl file if the build failed.)
(If you are creating a new deps.jl file because the build failed, note that deps.jl also contains a function check_deps() that checks that the library can be opened. In a pinch you can just define check_deps() = nothing.)
The Pkg.jl package that will be shipped with julia v1.3 will allow you to override artifacts
Oh, nice! It’ll take a while before the new artifacts feature will be in wide use though, I guess. From what I understand, this is intended to replace BinaryProvider eventually, correct?
The result of building a package Foo is usually a deps/deps.jl
Oh, sure, hacking “deps.jl” is always an option, and I’ve used it for demos. But it’s of course not something I can recommend to a group of people that may need to use our code with specific HDF5 options.