philss / rustler_precompiled

Use precompiled NIFs from trusted sources in your Elixir code
181 stars 25 forks source link

Add support for setting a global cache path using an env var #73

Closed philss closed 2 months ago

philss commented 2 months ago

This is a feature that can help people with internet access restrictions or writing permission limitations.

It may help people that need to support systems running on NixOS or a Nix environment.

In a nutshell, first download the desired ".tar.gz" artifact for a given package, set the RUSTLER_PRECOMPILED_GLOBAL_CACHE_PATH to the directory that the package was downloaded, and then build your project normally.

xanderio commented 2 months ago

Could you maybe add an environment variable that enable from source compilation for all rustler_precompiled packages? Currently this seams to only be possible by patching the config.exs of every package using rustler_precompiled.

philss commented 2 months ago

@xanderio I think so. I will open another PR for that :)