From patchwork Tue Mar 8 20:52:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cees de Groot X-Patchwork-Id: 37691 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7ABEA27BBEA; Tue, 8 Mar 2022 20:53:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4320327BBE9 for ; Tue, 8 Mar 2022 20:53:14 +0000 (GMT) Received: from localhost ([::1]:47492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRgpV-0005gc-9U for patchwork@mira.cbaines.net; Tue, 08 Mar 2022 15:53:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRgpK-0005eF-5S for guix-patches@gnu.org; Tue, 08 Mar 2022 15:53:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35890) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRgpJ-0002C7-TK for guix-patches@gnu.org; Tue, 08 Mar 2022 15:53:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRgpJ-0006lt-SD for guix-patches@gnu.org; Tue, 08 Mar 2022 15:53:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54304] [PATCH] Don't fix git executable location during Elixir build Resent-From: Cees de Groot Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 08 Mar 2022 20:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54304 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54304@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.164677273725968 (code B ref -1); Tue, 08 Mar 2022 20:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Mar 2022 20:52:17 +0000 Received: from localhost ([127.0.0.1]:58020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRgob-0006km-2E for submit@debbugs.gnu.org; Tue, 08 Mar 2022 15:52:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:36996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRgoZ-0006kf-K8 for submit@debbugs.gnu.org; Tue, 08 Mar 2022 15:52:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRgoZ-00050x-Ct for guix-patches@gnu.org; Tue, 08 Mar 2022 15:52:15 -0500 Received: from mail-4323.proton.ch ([185.70.43.23]:58905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRgoV-00027J-UL for guix-patches@gnu.org; Tue, 08 Mar 2022 15:52:14 -0500 Date: Tue, 08 Mar 2022 20:52:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=evrl.com; s=protonmail3; t=1646772722; bh=+UJykmJ3PV5R2EtV86yqRtp/UWUCO1WG1pV5QoyPy5U=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc:Date:Subject: Reply-To:Feedback-ID:Message-ID; b=Q+IDzC0oPCOCrFAK110NItyz9xM3BpF8b+BHt4wMorAG9opz9sKUP2NnNd9QGFY4U Sr7eOt2Lrho94N4C3PjcxNZUloxLlYU2vjPcEorqUjIIV+RpSgYMrxdU5Fkg3dN2Sx WyLgWbLnRbcMnyqLuCqc7mZIyK85DXmyh2AMHDxvZgxWUeB32Ub4Yf37H3/zuoOBQa TFtYfRxr0B5g663VgwNmyNjJzDVX7qf12ZTZFg5w1DN1y/iPZ8tpIc7q5ZFuCuGqwR RXJwCjZfDOFyXTGCM9IRxe37GQQxn2UYqmkRF09WtKnlNwRfAcdDwj0+8Z8Gt1y0Jz WqpAJm9FUXfLw== From: Cees de Groot Message-ID: MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.43.23; envelope-from=cg@evrl.com; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Cees de Groot Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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(-) -- 2.34.0 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")