guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: elixir: Set default value for MIX_REBAR3.


From: guix-commits
Subject: 02/02: gnu: elixir: Set default value for MIX_REBAR3.
Date: Mon, 19 Feb 2024 09:16:51 -0500 (EST)

abcdw pushed a commit to branch master
in repository guix.

commit ecfb6452cdd443e5b4a7391df015df41fb032a09
Author: Andrew Tropin <andrew@trop.in>
AuthorDate: Mon Feb 19 13:20:41 2024 +0300

    gnu: elixir: Set default value for MIX_REBAR3.
    
    * gnu/packages/elixir.scm (elixir): Set default value for MIX_REBAR3.
    
    Change-Id: Ic7332a3c997a26ca42229a6f2040f20d9b19aad1
---
 gnu/packages/elixir.scm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm
index 2d11707711..2885ddbd61 100644
--- a/gnu/packages/elixir.scm
+++ b/gnu/packages/elixir.scm
@@ -108,18 +108,21 @@
                 ;; program, for example `iex -S mix`, so we should not wrap
                 ;; mix into shell script.
                 (substitute* (string-append out "/bin/mix")
-                  (("Mix.start\\(\\)") "\
-~w[GUIX_ELIXIR_LIBS ERL_LIBS]
+                  (("Mix.start\\(\\)")
+                   (format #f "\
+~~w[GUIX_ELIXIR_LIBS ERL_LIBS]
 |> Enum.map(&System.get_env/1)
 |> Enum.reject(&is_nil/1)
 |> Enum.join(\":\")
 |> case do \"\" -> :ok; erl_libs -> System.put_env(\"ERL_LIBS\", erl_libs) end
-Mix.start()"))
+System.put_env(\"MIX_REBAR3\", System.get_env(\"MIX_REBAR3\", \"~a\"))
+Mix.start()"
+                           (search-input-file inputs "/bin/rebar3"))))
                 (for-each (lambda (program)
                             (wrap-program (string-append out "/bin/" program)
                               '("ERL_LIBS" prefix ("${GUIX_ELIXIR_LIBS}"))))
                           programs)))))))
-    (inputs (list erlang git))
+    (inputs (list erlang rebar3 git))
     (native-search-paths
      (list (search-path-specification
             (variable "GUIX_ELIXIR_LIBS")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]