Add the following to your mix.exs file:
def deps do
[
{:nif_extractous, "~> 0.12.0"}
]
endref extractous
This package bundles both the NIF library (libnif_extractous) and its dependency libtika_native in a single archive. During build, we modify the library paths to ensure proper runtime loading:
- Linux: Uses
patchelfto set the relative RPATH to$ORIGIN, allowing the bundledlibtika_native.soto be found alongside the NIF library - macOS: Uses
install_name_toolto modify the dynamic library path, ensuringlibtika_native.dylibis loaded from the same directory as the NIF library using@loader_path
This ensures that the NIF library can find its Tika dependency without requiring system-wide installation of Tika or additional configuration. The library is self-contained and should work out of the box when added as a dependency.
-
tag and push and wait for tags
-
build
EXTRACTOUS_BUILD=true mix rustler_precompiled.download NifExtractous.Native --all --ignore-unavailable --print- mix hex.publish