From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iGUOLMAmw2WeNQEA62LTzQ:P1 (envelope-from ) for ; Wed, 07 Feb 2024 07:44:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iGUOLMAmw2WeNQEA62LTzQ (envelope-from ) for ; Wed, 07 Feb 2024 07:44:16 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=key1 header.b="TT8LG/Du"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707288256; a=rsa-sha256; cv=none; b=LbhO3p4VvkKyHNSOHedx9KX7mQgAJ2jaRg5YqNHdRCY6cNG/L1DV32JegCJHMs4LzVqlFy qEsA9gLwpFzuR2ovJDMRA67+cxrtQ32KKfNCAAcO7Q7uTihH24ya1VfnyIRRnOTZlUqq8X SaTO+r9oHvXFyUiD/43yWFqhVl+7iiEQW9y+Vb3QVabA1HJoEbHhMmyvnnSL7e/kPd5TKw 20xXrmTsEN0inVVHTBcJ/AH29CThjKgc5ROxe85f5UxbtNKoubMVJRNaSgHIRAFr2gj0sI 4iS6GdUGLgI5lRfxwkyVGht+Vjqw/oXn5p1mfSoOcOw0X2I7UVvgSsctNEUObA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=key1 header.b="TT8LG/Du"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707288256; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=bcCLhOrE5ML3TOMN+I1i3AuiTyd3US3xutK4ExRnZGc=; b=I8E9l/RPFIdd0CkkJInr/lFrtyqle4KONV/N5MaWMPE6X7Yqy19PHSV0JVwD/LT/mX9ScJ oqOY3DJFuHAUI2YvsUmxxcE9SDsTA78ixp4n+Q7nih0e7NEQIuCfCEJX0s21juhMrhkHP2 J74EUHCaHkKsLbxzzUFgnkFDYp5fcgcLXzH1NwvYf83p6j3g90A+7fej4EnXbaeZHk018y H8jo4kINUYBqc9mfpdfh/n/QyHEN5y0lzbOJOj8xdnNzOTpqjoAAslzZyxrgYikMt4aNPh nGsuWgvYJKta0M4/9SenwagQ6j969nQ20yO3KJf7ZTFSymvItP73df9D8NDfMg== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 90F81251A5 for ; Wed, 7 Feb 2024 07:44:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXbey-0007O1-8O; Wed, 07 Feb 2024 01:43:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXbev-0007Nh-VB for guix-patches@gnu.org; Wed, 07 Feb 2024 01:43:50 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXbev-0004kz-Lu for guix-patches@gnu.org; Wed, 07 Feb 2024 01:43:49 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXbf7-0005v7-Vv for guix-patches@gnu.org; Wed, 07 Feb 2024 01:44:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68964] [PATCH] gnu: elixir: Remove wrap for mix. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Feb 2024 06:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68964 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68964@debbugs.gnu.org Cc: Pierre-Henry =?UTF-8?Q?Fr=C3=B6hring?= , Liliana Marie Prikler , Andrew Tropin X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170728820922708 (code B ref -1); Wed, 07 Feb 2024 06:44:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Feb 2024 06:43:29 +0000 Received: from localhost ([127.0.0.1]:55607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXbeb-0005uB-0E for submit@debbugs.gnu.org; Wed, 07 Feb 2024 01:43:29 -0500 Received: from lists.gnu.org ([2001:470:142::17]:44006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXbeY-0005tw-Ne for submit@debbugs.gnu.org; Wed, 07 Feb 2024 01:43:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXbeB-0007JU-On for guix-patches@gnu.org; Wed, 07 Feb 2024 01:43:04 -0500 Received: from out-189.mta1.migadu.com ([95.215.58.189]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXbe7-0004bd-RZ for guix-patches@gnu.org; Wed, 07 Feb 2024 01:43:01 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1707288175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=bcCLhOrE5ML3TOMN+I1i3AuiTyd3US3xutK4ExRnZGc=; b=TT8LG/Du9dFr24bSsSXq91Of6dXNDqTqgDSWY/ktSTEyz1hfGmkT5HQ5Ndh91yrcWa9n44 /1J3kO/I5QxdsFXD83aCvziWSPUZAuYRyPFHHz0WfvAXhXaRcgL2rwAxllwa5TXfUQuty1 rSoe6I9p3HNg4qL9S0TuF306TnXe0r4zfeOYM0VrQExqtxg73e7Ejs6MjI1RJkorCTosz6 K8VVNZQOfSwcb4O00oZF33q1pp16OZgO1ID2b/ApUrY8FPsE7lsf+cR+lCel1pIm26u2w2 kwSwFOm2x7+k9WLSte9Q6qQ9B9BaGbQOuxJUYIViIaR81ORyiPrjnECzt/aWpg== Date: Wed, 7 Feb 2024 09:39:22 +0300 Message-ID: <0be1b4f12499d6bf415b4c81971c21ad290cae07.1707287957.git.andrew@trop.in> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=95.215.58.189; envelope-from=andrew@trop.in; helo=out-189.mta1.migadu.com 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, 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: Andrew Tropin X-ACL-Warn: , Andrew Tropin via Guix-patches From: Andrew Tropin via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Spam-Score: -5.17 X-Migadu-Queue-Id: 90F81251A5 X-Migadu-Spam-Score: -5.17 X-TUID: oqc97e+4tCy4 * gnu/packages/elixir.scm (elixir)[#:phases]: Instead of wrapping mix into shell script, which sets environment variables, we patch mix itself and set environmnet variables via elixir code. Change-Id: Ia4643e18fe927491242a0541938b7570bd56fca1 --- gnu/packages/elixir.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index ef8c39d0d7..70a8fad5e8 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -101,7 +101,18 @@ (define-public elixir (add-after 'install 'wrap-programs (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) - (programs '("elixir" "elixirc" "iex" "mix"))) + (programs '("elixir" "elixirc" "iex"))) + ;; mix can be sourced as an elixir script by other elixir + ;; 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] +|> 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()")) (for-each (lambda (program) (wrap-program (string-append out "/bin/" program) '("ERL_LIBS" prefix ("${GUIX_ELIXIR_LIBS}")))) base-commit: cce7a6d2d2b18f51d1fcab67b02a38c11d6f4f2d -- 2.41.0