summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCees de Groot <cg@evrl.com>2022-03-08 20:52:00 +0000
committerLudovic Courtès <ludo@gnu.org>2022-03-13 23:13:46 +0100
commitfce9f13b5417b63a6ba5ae03bd8a2ae82ef0a043 (patch)
treece6e2874ee05f7a1b1ef360543f9796470747eed
parent7bdead3fcea28e2688b00d8afbd15e29a18b8c3d (diff)
gnu: elixir: Don't fix Git executable location during Elixir build.
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 <ludo@gnu.org>
-rw-r--r--gnu/packages/elixir.scm8
1 files changed, 3 insertions, 5 deletions
diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm
index 55e17f2901b..1336a99a0b3 100644
--- a/gnu/packages/elixir.scm
+++ b/gnu/packages/elixir.scm
@@ -60,11 +60,9 @@
60 (for-each make-file-writable (find-files ".")))) 60 (for-each make-file-writable (find-files "."))))
61 (add-after 'make-git-checkout-writable 'replace-paths 61 (add-after 'make-git-checkout-writable 'replace-paths
62 (lambda* (#:key inputs #:allow-other-keys) 62 (lambda* (#:key inputs #:allow-other-keys)
63 (substitute* '("lib/elixir/lib/system.ex" 63 ;; Note: references end up obfuscated in binary BEAM files where
64 "lib/mix/lib/mix/scm/git.ex") 64 ;; they may be invisible to the GC and graft code:
65 (("(cmd\\(['\"])git" _ prefix) 65 ;; <https://issues.guix.gnu.org/54304#11>.
66 (string-append prefix
67 (search-input-file inputs "/bin/git"))))
68 (substitute* '("lib/mix/lib/mix/release.ex" 66 (substitute* '("lib/mix/lib/mix/release.ex"
69 "lib/mix/lib/mix/tasks/release.init.ex") 67 "lib/mix/lib/mix/tasks/release.init.ex")
70 (("#!/bin/sh") 68 (("#!/bin/sh")