all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giacomo Leidi via Guix-patches via <guix-patches@gnu.org>
To: 73458@debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul@autistici.org>
Subject: [bug#73458] [PATCH v2 1/2] build-system: mix: Allow loading Erlang dependencies in Mix driven builds.
Date: Wed, 25 Sep 2024 23:39:17 +0200	[thread overview]
Message-ID: <a58ca6de638b7a1de02dd9c814ad3847d4177fbe.1727300358.git.goodoldpaul@autistici.org> (raw)
In-Reply-To: <e5b56c8f-b7f0-c5e5-bcfd-07a4ed4fffb2@autistici.org>

* 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

Change-Id: I2e0ae4908353833d81003b4f750af56ff3f8dbfb
---
 guix/build/mix-build-system.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

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 @@ (define* (set-mix-env #:key inputs mix-path mix-exs #:allow-other-keys)
   (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."

base-commit: a1dc5ac832a106d46450961e78e7db3f83bf2bff
-- 
2.46.0





  parent reply	other threads:[~2024-09-25 21:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24 17:03 [bug#73458] Fix mix-build-system bugs (73453 , 73454) paul via Guix-patches via
2024-09-25  8:24 ` [bug#73458] [PATCH 1/2] build-system: mix: Allow loading Erlang dependencies in Mix driven builds Giacomo Leidi via Guix-patches via
2024-09-25  8:24   ` [bug#73458] [PATCH 2/2] build-system: mix: Fix decoding of package names with git versions Giacomo Leidi via Guix-patches via
2024-09-25 19:54     ` Liliana Marie Prikler
2024-09-25 21:30       ` paul via Guix-patches via
2024-09-25 18:42   ` [bug#73458] [PATCH 1/2] build-system: mix: Allow loading Erlang dependencies in Mix driven builds Liliana Marie Prikler
2024-09-25 21:39 ` Giacomo Leidi via Guix-patches via [this message]
2024-09-25 21:39   ` [bug#73458] [PATCH v2 2/2] build-system: mix: Fix decoding of package names with git versions Giacomo Leidi via Guix-patches via
2024-10-12 17:51   ` bug#73458: Fix mix-build-system bugs (73453 , 73454) Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a58ca6de638b7a1de02dd9c814ad3847d4177fbe.1727300358.git.goodoldpaul@autistici.org \
    --to=guix-patches@gnu.org \
    --cc=73458@debbugs.gnu.org \
    --cc=goodoldpaul@autistici.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.