From d5353e24700102eb3fbf872800135b13e0268ea1 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 14 Feb 2022 14:29:02 +0100 Subject: gnu: elixir: Fix file name argument to 'search-input-file'. Reported by John Hamelink and Cees de Groot . Regression introduced in 3da297997dad5b3525277fcecdca84f01d45b104. * gnu/packages/elixir.scm (elixir)[arguments]: In 'replace-paths' phase, search for "/bin/sh", not "sh". --- gnu/packages/elixir.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/elixir.scm') diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 3fb74a56a5..fae8279e5c 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -68,7 +68,7 @@ (define-public elixir (substitute* '("lib/mix/lib/mix/release.ex" "lib/mix/lib/mix/tasks/release.init.ex") (("#!/bin/sh") - (string-append "#!" (search-input-file inputs "sh")))) + (string-append "#!" (search-input-file inputs "/bin/sh")))) (substitute* "bin/elixir" (("^ERTS_BIN=$") (string-append -- cgit v1.2.3 From d59f7effcf482fb23897e6e1e3b922e3cb49e8ee Mon Sep 17 00:00:00 2001 From: Cees de Groot Date: Tue, 1 Feb 2022 14:12:17 -0500 Subject: gnu: elixir: Fix regex for ERTS_BIN substitution. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/elixir.scm (elixir)[arguments]: In 'replace-paths' phase, change "ERTS_BIN" regexp. Signed-off-by: Ludovic Courtès --- gnu/packages/elixir.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/elixir.scm') diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index fae8279e5c..55e17f2901 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -70,7 +70,7 @@ (define-public elixir (("#!/bin/sh") (string-append "#!" (search-input-file inputs "/bin/sh")))) (substitute* "bin/elixir" - (("^ERTS_BIN=$") + (("ERTS_BIN=\n") (string-append "ERTS_BIN=" ;; Elixir Releases will prepend to ERTS_BIN the path of -- cgit v1.2.3 From fce9f13b5417b63a6ba5ae03bd8a2ae82ef0a043 Mon Sep 17 00:00:00 2001 From: Cees de Groot Date: Tue, 8 Mar 2022 20:52:00 +0000 Subject: gnu: elixir: Don't fix Git executable location during Elixir build. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The removed code below affected two locations where Elixir uses Git: * At build-time, Git is used to see if the build is inside a Git repo and if so, git info is added to the build information that Elixir returns with `System.build_info()`. The code uses PATH + `git` so the Git version from the inputs is used which is just fine. * At run-time, Git is used by Mix if, and only if, there are any Git-based dependencies. This is not the normal case, and in that sense Git is an optional dependency of Elixir - most projects will work just fine without Git being present. Here, too, PATH + `git` is used so if there is a need on a user's system to use Git-based dependencies, the user can just add the package to the profile and things will just work. I feel that leaving this alone is cleaner than trying to fix the dependency (if we want to keep it, it needs to be in propagated-inputs in order to keep Git around; I stumbled upon this building a project with Git dependencies after doing a `guix gc`. However, given that using Git dependencies is the exception and I think that minimizing dependencies is nicer I opted to just remove the substition completely). * gnu/packages/elixir.scm (elixir)[arguments]: In 'replace-paths' phase, remove substitutions of "git". Co-authored-by: Ludovic Courtès --- gnu/packages/elixir.scm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'gnu/packages/elixir.scm') diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 55e17f2901..1336a99a0b 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -60,11 +60,9 @@ (define-public elixir (for-each make-file-writable (find-files ".")))) (add-after 'make-git-checkout-writable 'replace-paths (lambda* (#:key inputs #:allow-other-keys) - (substitute* '("lib/elixir/lib/system.ex" - "lib/mix/lib/mix/scm/git.ex") - (("(cmd\\(['\"])git" _ prefix) - (string-append prefix - (search-input-file inputs "/bin/git")))) + ;; Note: references end up obfuscated in binary BEAM files where + ;; they may be invisible to the GC and graft code: + ;; . (substitute* '("lib/mix/lib/mix/release.ex" "lib/mix/lib/mix/tasks/release.init.ex") (("#!/bin/sh") -- cgit v1.2.3