all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#54304] [PATCH] Don't fix git executable location during Elixir build
@ 2022-03-08 20:52 Cees de Groot
  2022-03-08 22:16 ` Maxime Devos
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Cees de Groot @ 2022-03-08 20:52 UTC (permalink / raw)
  To: 54304

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 | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm
index 55e17f2901..f509c59ee3 100644
--- a/gnu/packages/elixir.scm
+++ b/gnu/packages/elixir.scm
@@ -60,11 +60,6 @@ (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"))))
               (substitute* '("lib/mix/lib/mix/release.ex"
                              "lib/mix/lib/mix/tasks/release.init.ex")
                 (("#!/bin/sh")
--
2.34.0





^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-03-13 22:18 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 20:52 [bug#54304] [PATCH] Don't fix git executable location during Elixir build Cees de Groot
2022-03-08 22:16 ` Maxime Devos
2022-03-09 17:35   ` Cees de Groot
2022-03-09 17:59     ` Tobias Geerinckx-Rice via Guix-patches via
2022-03-09 21:01       ` Cees de Groot
2022-03-09 21:49         ` Tobias Geerinckx-Rice via Guix-patches via
2022-03-11 21:33           ` Cees de Groot
2022-03-11 21:51             ` Ludovic Courtès
2022-03-11 21:57               ` Maxime Devos
2022-03-11 22:01                 ` Cees de Groot
2022-03-11 22:11                   ` Maxime Devos
2022-03-11 22:36                     ` Cees de Groot
2022-03-11 22:45                       ` Maxime Devos
2022-03-11 22:55                         ` Cees de Groot
2022-03-11 23:16                       ` Maxime Devos
2022-03-11 23:23                         ` Cees de Groot
2022-03-13 22:14                 ` Ludovic Courtès
2022-03-13 22:16                   ` Cees de Groot
2022-03-08 22:17 ` Maxime Devos
     [not found]   ` <OtG7oZgFz6vgVWUbmqcU-n34hv-sQCpJYpJKR7rdQvIDnB1sUh_1LoUl9egvv6vKWH_THdYl9gwPrzwzXx_FnxlPXJHaB3D70jY32T3oMuk=@evrl.com>
2022-03-09  7:31     ` Maxime Devos
2022-03-09 17:29       ` Cees de Groot
2022-03-08 22:18 ` Maxime Devos
2022-03-08 22:22 ` Maxime Devos
2022-03-09 17:31   ` Cees de Groot
2022-03-09 19:45     ` Maxime Devos

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.