Skip to content

mix.exs: Make it possible to build NIF from source.#38

Open
fishinthecalculator wants to merge 1 commit into
dashbitco:mainfrom
fishinthecalculator:build_nif
Open

mix.exs: Make it possible to build NIF from source.#38
fishinthecalculator wants to merge 1 commit into
dashbitco:mainfrom
fishinthecalculator:build_nif

Conversation

@fishinthecalculator

Copy link
Copy Markdown
Contributor

Builds running in segregated environments, like Nix or Guix ones, have no access to the internet. Make it possible to build the NIF from source by setting the LAZY_HTML_BUILD=true environment variable.

  • mix.exs: Read LAZY_HTML_BUILD to make it possible to build the NIF from source instead of downloading its binary.

Builds running in segregated environments, like Nix or Guix ones, have
no access to the internet. Make it possible to build the NIF from source
by setting the LAZY_HTML_BUILD=true environment variable.

* mix.exs: Read LAZY_HTML_BUILD to make it possible to build the NIF
from source instead of downloading its binary.
@josevalim

Copy link
Copy Markdown
Member

Shall we just merge this with #37 and make it so the system configuration automatically implies building from source?

Comment thread mix.exs
make_precompiler: {:nif, CCPrecompiler},
make_precompiler_url: "#{@github_url}/releases/download/v#{@version}/@{artefact_filename}",
make_precompiler_filename: "liblazy_html",
make_precompiler_nif_versions: [versions: ["2.16"]],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a config option to force the build, so we can add this instead:

make_force_build: System.get_env("LAZY_HTML_BUILD") in ["1", "true"],

@jonatanklosko

Copy link
Copy Markdown
Member

Shall we just merge this with #37 and make it so the system configuration automatically implies building from source?

Sounds good! Though I wonder if instead of supporting system lexbor, we should vendor in the lexbor C code and still build it as usual.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants