diff options
author | Giacomo Leidi <goodoldpaul@autistici.org> | 2024-09-25 23:39:17 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-10-12 19:48:35 +0200 |
commit | b6ea4f82986af507d787c1271077f61d504730ad (patch) | |
tree | 9e6b1d98fef71369bc89db03ef7d21e3399c21cb | |
parent | 003366fc96080abcd07a8573a58e784ca837dbb9 (diff) | |
download | guix-b6ea4f82986af507d787c1271077f61d504730ad.tar.gz guix-b6ea4f82986af507d787c1271077f61d504730ad.zip |
build-system: mix: Allow loading Erlang dependencies in Mix driven builds.
* guix/build/mix-build-system.scm (set-mix-env): sets ERL_LIBS to allow
Erlang's virtual machine to load Erlang dependencies in Mix builds.
Fixes <https://issues.guix.gnu.org/73453>
Change-Id: Ic1ef5db20680bfd265fbac72bafb760d21135f68
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Change-Id: Idcb6f349194a6cbf7516e9188b888c740fbf501f
-rw-r--r-- | guix/build/mix-build-system.scm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/guix/build/mix-build-system.scm b/guix/build/mix-build-system.scm index 0b021da791..73af575b10 100644 --- a/guix/build/mix-build-system.scm +++ b/guix/build/mix-build-system.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2023 Pierre-Henry Fröhring <contact@phfrohring.com> ;;; Copyright © 2024 Igor Goryachev <igor@goryachev.org> +;;; Copyright © 2024 Giacomo Leidi <goodoldpaul@autistici.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -92,7 +93,15 @@ See: https://hexdocs.pm/mix/1.15.7/Mix.html#module-environment-variables" (setenv "MIX_EXS" mix-exs) (setenv "MIX_HOME" (getcwd)) (setenv "MIX_PATH" (or mix-path "")) - (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar3") "/bin/rebar3"))) + (setenv "MIX_REBAR3" (string-append (assoc-ref inputs "rebar3") "/bin/rebar3")) + ;; Add Erlang dependencies in Elixir's load path. + (setenv "ERL_LIBS" + (string-join (search-path-as-list + `("lib/erlang/lib") + (map (match-lambda + ((label . package) package)) + inputs)) + ":"))) (define* (set-elixir-version #:key inputs #:allow-other-keys) "Store the version number of the Elixir input in a parameter." |