From patchwork Fri Dec 8 11:10:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pierre-Henry_Fr=C3=B6hring?= X-Patchwork-Id: 57374 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 9564D27BBEA; Fri, 8 Dec 2023 11:14:13 +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=ham 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 AC75927BBE2 for ; Fri, 8 Dec 2023 11:14:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBYno-000703-K6; Fri, 08 Dec 2023 06:13: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 1rBYnm-0006zV-0M 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-0006xy-OG 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-0002RS-Hu for guix-patches@gnu.org; Fri, 08 Dec 2023 06:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66801] [PATCH 03/15] gnu: Add elixir-hex. 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: 66801@debbugs.gnu.org, Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Received: via spool by 66801-submit@debbugs.gnu.org id=B66801.17020340239326 (code B ref 66801); Fri, 08 Dec 2023 11:14:02 +0000 Received: (at 66801) by debbugs.gnu.org; 8 Dec 2023 11:13:43 +0000 Received: from localhost ([127.0.0.1]:43932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBYnf-0002QM-9k for submit@debbugs.gnu.org; Fri, 08 Dec 2023 06:13:43 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:40957) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBYnd-0002Pu-SA for 66801@debbugs.gnu.org; Fri, 08 Dec 2023 06:13:42 -0500 Received: by mail.gandi.net (Postfix) with ESMTPSA id 9826960007; Fri, 8 Dec 2023 11:13:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=phfrohring.com; s=gm1; t=1702034003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fe9NDYIp2SSz/ryveYzpX0Xmhprq5TLVAGhBfX9/cGM=; b=gqX3ZVuAUE2Z8P5zUE32YZv1HZRO3GTzVdD67vbJScGOSOnd6dkXe1UekNUBSXmLo/aFDi KbizkhyKBZuK8XvlqhuHzdsqyjLh1gJIWK9eGab1Uv2AH8lGbPNwcLePZ7/nUUpYL11mA2 22OI0M63rcJTz/vY7cYD0g1ZylQ28AZdJ6MTlWCZeykTNGuyXKS5bipZhel0BYlktYDfZ+ 3Yn6EpwJ2jPhMqaRP4hlrPyIVKj34JCgT2Kwg00YvdVpMMRaQWKYpxbtAKpVamGRoKd50H UHeNZLXodIqQTVDSov6kccyUYLPkie+eJevZK2bxS3pL6RepZmqDLlXTSMYeBg== From: Pierre-Henry =?utf-8?b?RnLDtmhyaW5n?= Date: Fri, 8 Dec 2023 12:10:41 +0100 Message-ID: <937fdf197914163a125e2e8a12497fb9ebbde81b.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 From: Pierre-Henry Fröhring * gnu/packages/elixir.scm (elixir-hex): New variable. Change-Id: I957688ae4e078afd79acd439880c38083fdab83a --- gnu/packages/elixir.scm | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm index 15cbdbdfc..cb9074526 100644 --- a/gnu/packages/elixir.scm +++ b/gnu/packages/elixir.scm @@ -118,3 +118,46 @@ (define-public elixir for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.") (license license:asl2.0))) + +(define-public elixir-hex + (package + (name "elixir-hex") + (version "2.0.5") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hexpm/hex.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1kvczwvij58kgkhak68004ap81pl26600bczg21mymy2sypkgxmj")))) + ;; The mix-build-system assumes that Hex exists. + ;; We build Hex using the gnu-build-system. + ;; Other Elixir packages use the mix-build-system. + (build-system gnu-build-system) + (inputs (list elixir)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'bootstrap) + (delete 'configure) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + (setenv "MIX_ENV" "prod") + (invoke "mix" "compile"))) + (delete 'check) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (define X.Y #$(version-major+minor (package-version elixir))) + (define out (string-append (assoc-ref outputs "out") "/lib/elixir/" X.Y "/hex")) + (mkdir-p out) + (copy-recursively "_build/prod/lib/hex" out)))))) + (synopsis "Package manager for the Erlang VM") + (description + "This project provides tasks that integrate with Mix, Elixir's build +tool.") + (home-page "https://hexdocs.pm/makeup_elixir/") + (license license:bsd-2)))