From patchwork Fri Dec 8 11:10:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Pierre-Henry_Fr=C3=B6hring?= X-Patchwork-Id: 57373 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 3350927BBE9; Fri, 8 Dec 2023 11:14:12 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 824D027BBE2 for ; Fri, 8 Dec 2023 11:14:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBYnp-000707-Nx; Fri, 08 Dec 2023 06:13:53 -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 1rBYnl-0006zT-HL for guix-patches@gnu.org; Fri, 08 Dec 2023 06:13: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 1rBYnl-0006xo-8S for guix-patches@gnu.org; Fri, 08 Dec 2023 06:13:49 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBYny-0002RJ-3E for guix-patches@gnu.org; Fri, 08 Dec 2023 06:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66801] [PATCH 02/15] gnu: elixir: Wrap binaries. Resent-From: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 08 Dec 2023 11:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66801 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: liliana.prikler@gmail.com Cc: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= , 66801@debbugs.gnu.org Received: via spool by 66801-submit@debbugs.gnu.org id=B66801.17020340039261 (code B ref 66801); Fri, 08 Dec 2023 11:14:02 +0000 Received: (at 66801) by debbugs.gnu.org; 8 Dec 2023 11:13:23 +0000 Received: from localhost ([127.0.0.1]:43928 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBYnK-0002PJ-U1 for submit@debbugs.gnu.org; Fri, 08 Dec 2023 06:13:23 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]:35111) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBYnI-0002Os-Mt for 66801@debbugs.gnu.org; Fri, 08 Dec 2023 06:13:21 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id E0DC460003; Fri, 8 Dec 2023 11:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=phfrohring.com; s=gm1; t=1702033982; 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: in-reply-to:in-reply-to:references:references; bh=Too275ATH3DnZfaDLq2YMsLOUjiqHUrIkhEfxt+fPRM=; b=DPsNMwu/1iDSrxoN4AZfCDzQuXU9tGTFM2mSC7pv1tEYDMV6ZpOMjKlDl5Ka+ZyDngrzoW O1Wac4/IBfT0cid75yfSL9wg5KHBeEOKqSGbwZtBVrO/2wUiJynPAIZQEZQDeHx03Q8sJB DJT9a+GSesc7KoQmoMknyLbkcQoCZZ73SE820mAFPZywAPEpJ/Z8m/NL/izILMq46HW83Q QRqh6braEiPGs4JYSPjWUP64Pfoybs+0kaRRw0JpP1Y4oxaCdxVDJfCBvoSOM6rT2A+G+5 QCxfcAvidG1fYneKp77NZjN2DqKFNVMvFqNaUEWxGL37fNI4N3CijWC4oVAgow== From: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Date: Fri, 8 Dec 2023 12:10:38 +0100 Message-ID: <890f17a9c0c5ea79addb025bec17f08d054cfb5b.1702033823.git.contact@phfrohring.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-GND-Sasl: contact@phfrohring.com 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/elixir.scm (elixir)[arguments]: Phase `wrap-programs' added. * gnu/packages/elixir.scm (elixir)[native-search-paths]: Variable `GUIX_ELIXIR_LIBS' added. Change-Id: I75bdde3aeedc1d495ea5fc2c5fc3fcdc5dc3fad2 --- gnu/packages/elixir.scm | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 724b42512..15cbdbdfc 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -27,6 +27,7 @@ (define-module (gnu packages elixir) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (guix gexp) + #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (gnu packages) @@ -96,9 +97,20 @@ (define-public elixir (lambda* (#:key inputs #:allow-other-keys) ;; Some tests require access to a home directory. (setenv "HOME" "/tmp"))) - (delete 'configure)))) - (inputs - (list erlang git)) + (delete 'configure) + (add-after 'install 'wrap-programs + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (programs '("elixir" "elixirc" "iex" "mix"))) + (for-each (lambda (program) + (wrap-program (string-append out "/bin/" program) + '("ERL_LIBS" prefix ("${GUIX_ELIXIR_LIBS}")))) + programs))))))) + (inputs (list erlang git)) + (native-search-paths + (list (search-path-specification + (variable "GUIX_ELIXIR_LIBS") + (files (list (string-append "lib/elixir/" (version-major+minor version))))))) (home-page "https://elixir-lang.org/") (synopsis "Elixir programming language") (description "Elixir is a dynamic, functional language used to build