From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id O/hFHXww92RfGAAAG6o9tA:P1 (envelope-from ) for ; Tue, 05 Sep 2023 15:43:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id O/hFHXww92RfGAAAG6o9tA (envelope-from ) for ; Tue, 05 Sep 2023 15:43:24 +0200 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 0D57E39B81 for ; Tue, 5 Sep 2023 15:43:23 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=BSiEaGX1; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693921404; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Vjrf0PZ5bGPAUd9Z1AEr743CcVtmwxbNyYZjq6Hz5LU=; b=Ujb5fNUDzUqK5s78g+cwRfnWK3uzBRaxTypsU+2RhULpQqEvc6Hfz0rAk8zDyZhDu6fMBh k+kxggVSpMv1nSfDK7x+212fHZHg9FE0rV/xLWkTxdVvNsTwR/INWyXFg4wogJrq9sr0r3 NYteAsF13KNWfwMPWFad7sU/VuY7TySRp2L0Xi5BxMj+igTc2SybDKfEN0IREVeo85RsKx qweMbd0V/ATF/73Q9o9XBjR+5Zwc21/6J3UPF3ZiCqNhZfm7SUQzYW7JUuqaGivgf2TDgl r1bC1wr0Z+FFykZI3R35P4uiqebfaxByw3507Bs/vKiqSiUOaHwEBhdPYHIIVA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=BSiEaGX1; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693921404; a=rsa-sha256; cv=none; b=lbr1Qy7UeqbkQgmua1f4KnfmP9nV+o2EVTaE9qb8Ca6KtXE/Rr1tPJHlR8rWn4CZ4gwYcS ++QIyWHeLYLnAoDpriZNzqqJ1o92St7xIZ8/o1gutTkqF8kgdeJ753HwCx0EdJ96VUFDHK RdJ/Ta/5F64wwllKY8TpAA2NFyGynD1RKl50egdmdpdC/jea5qozUM2TqTv9rZ34j2IuV+ koONSJsJ1Ed0fJrQyHpYoE7N3fp4ruOHXhdc5KAOfog8Jka+Bk429hyPwzeKPskukfBrwD 73QRtw68r7y5uEBFzM3qu/xr78Rz2WuKsajVAvOqCKndsQR2mmga6kRddNprjQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdWKh-0005Lq-GZ; Tue, 05 Sep 2023 09:43:07 -0400 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 1qdWKc-0005KR-Ui for guix-patches@gnu.org; Tue, 05 Sep 2023 09:43:04 -0400 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 1qdWKb-0008BG-Ns for guix-patches@gnu.org; Tue, 05 Sep 2023 09:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdWKb-0006Me-UX for guix-patches@gnu.org; Tue, 05 Sep 2023 09:43:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65313] [PATCH 0/1] gnu: Add erlang-lfe. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Sep 2023 13:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65313 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tim Johann Cc: 65313@debbugs.gnu.org Received: via spool by 65313-submit@debbugs.gnu.org id=B65313.169392133124391 (code B ref 65313); Tue, 05 Sep 2023 13:43:01 +0000 Received: (at 65313) by debbugs.gnu.org; 5 Sep 2023 13:42:11 +0000 Received: from localhost ([127.0.0.1]:55178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdWJm-0006LK-WB for submit@debbugs.gnu.org; Tue, 05 Sep 2023 09:42:11 -0400 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]:62838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdWJj-0006Ku-0W for 65313@debbugs.gnu.org; Tue, 05 Sep 2023 09:42:09 -0400 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-6543d62e9a4so13498146d6.1 for <65313@debbugs.gnu.org>; Tue, 05 Sep 2023 06:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693921321; x=1694526121; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Vjrf0PZ5bGPAUd9Z1AEr743CcVtmwxbNyYZjq6Hz5LU=; b=BSiEaGX1Bh5OC2pmmRoMY2T4HDXJIR+Ap74CH6wZ32ZGvLVUbBMpL4tRHmlOkWvBUO gqpQARYmNpIelegOPzdiX4hMHVzb4epvNQTwBlc/Q4xc98FDRsoy+cVo9p5xaG7XwpFF 2ewPL114INBMAYRL2JRbUqCNc9gbaM2Uu26CFmDeyq2oIdxkHsBEdYhV7ANanfmwxeoP xNEkpH6Ab7YwCAjOz5p3c6X674AlrreKZxDL5RCpM0p/ti7yU4KjOsQqfPFAzfMYFu0m wlOReRpBzu/0BUHbb8WtlM/8bWal84ernH4H8eOdw6STllLe+uKF+5UGn9C+B4xSKNca o9OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693921321; x=1694526121; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Vjrf0PZ5bGPAUd9Z1AEr743CcVtmwxbNyYZjq6Hz5LU=; b=enJmSjqL6tvRQBL0kXE1o0DX9yEyd3ps4GH160cO1DWb3h9IA6gckyM03DCr5PeJRp QN1Iq35ithUPKeuCHuAP3d1hjAogJicoAKjkFWbhQCVkGynO6Kjoh/XnWY26u3Ony2oL j30xqrabBHVOgQEa13ZsF7/fWGRYRcdLywT2iC7kRsg+3nvIOpdsZPI2qQijA9PYgU43 Pnit2xoAg5GZeIfKl1hsWxrNhPXrKPRUUxsF5IVEeg4WsVwDBFtc5KUednDQdNTtBSVK kKTcKx0emeNlrsja6vKtIpvucwA1VR2/vvCh8DyGkzpKc+imckkN6AoU0/LRn2ItpsGW wGlw== X-Gm-Message-State: AOJu0YyqaqlV26rp0Rd2c6hZ2pUW4uPWEIHZxsR/aEe9HUxD0fWiRj4L 2NWIsy84G+xcH0VxLhXXpEMhjN3DF/LTrw== X-Google-Smtp-Source: AGHT+IFjxDIz6lHap6FVHTri4j3ALuCcKjM4so2Cx3vY0OZ/B/VJa/872Hy4Ng4E4Z0jRxJhDjAMKA== X-Received: by 2002:a0c:e3d3:0:b0:649:1690:57ae with SMTP id e19-20020a0ce3d3000000b00649169057aemr16540310qvl.16.1693921320581; Tue, 05 Sep 2023 06:42:00 -0700 (PDT) Received: from hurd (dsl-153-125.b2b2c.ca. [66.158.153.125]) by smtp.gmail.com with ESMTPSA id b19-20020a0cf053000000b0063d0159e1f6sm4398457qvl.109.2023.09.05.06.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Sep 2023 06:42:00 -0700 (PDT) From: Maxim Cournoyer References: Date: Tue, 05 Sep 2023 09:41:58 -0400 In-Reply-To: (Tim Johann's message of "Tue, 15 Aug 2023 17:27:32 +0200") Message-ID: <874jk8lot5.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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+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-Queue-Id: 0D57E39B81 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 2.77 X-Spam-Score: 2.77 X-TUID: uKsQABvzYAd/ tags 65313 + moreinfo quit Hello, Tim Johann writes: > --- > gnu/packages/erlang.scm | 77 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 77 insertions(+) > > diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm > index a7f161647b..df7212b0e5 100644 > --- a/gnu/packages/erlang.scm > +++ b/gnu/packages/erlang.scm > @@ -738,3 +738,80 @@ (define-public rebar3-proper > (description "This plugin allows running PropEr test suites from within > rebar3.") > (license license:bsd-3))) > + > +(define-public erlang-lfe > + (package > + (name "erlang-lfe") > + (version "2.1.2") > + (source > + (origin > + (method git-fetch) > + ;; The tarball from http://erlang.org/download contains many > + ;; pre-compiled files, so we use this snapshot of the source > + ;; repository. > + (uri (git-reference > + (url "https://github.com/lfe/lfe") > + (commit "v2.1.2"))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 > + "180hz1p2v3vb6yyzcfwircmljlnd86ln8z80lzy3mwlyrcxblvxy")))) > + (build-system gnu-build-system) > + (native-inputs > + (list rebar3 rebar3-proper erlang-proper)) > + (propagated-inputs > + (list erlang)) Nitpick: less than 5 dependencies can fit be formatted on the same line, if it fits, e.g. (native-inputs (list rebar3 rebar3-proper erlang-proper)) Otherwise the convention is to use something like (native-inputs (list package1 package2 ...)) Or let 'guix style' take care of it. > + (arguments > + `(#:phases New packages should use gexps for arguments, so something like (arguments (list #:phases #~(modify-phases %standard-phases ...))) > + (modify-phases %standard-phases > + (delete 'configure) > + > + ;; The following is inspired by rebar-build-system.scm > + (add-before 'check 'erlang-depends > + (lambda* (#:key inputs #:allow-other-keys) > + (use-modules (ice-9 ftw)) > + (define input-directories > + (map (lambda (p) (cdr (assoc p inputs))) > + '("rebar3-proper" "erlang-proper"))) It's not typically safe to call use-modules elsewhere than at the top level (it would cause problems with macros). For imports, you should use the #:modules build argument. Here you could also simply use (define input-directories (list #$(this-package-input "rebar3-proper") #$(this-package-input "erlang-proper"))) since there are only 2 items. > + (mkdir-p "_checkouts") > + (for-each > + (lambda (input-dir) > + (let ((elibdir (string-append input-dir "/lib/erlang/lib"))) > + (when (directory-exists? elibdir) > + (for-each > + (lambda (dirname) > + (let ((src (string-append elibdir "/" dirname)) > + (dest (string-append "_checkouts/" dirname))) > + (when (not (file-exists? dest)) > + ;; symlinking will not work, since rebar3 will try > + ;; to overwrite the _build directory several times > + ;; with the contents of _checkout, so we copy the > + ;; directory tree to _checkout and make it writeable. > + (copy-recursively src dest #:follow-symlinks? #t) > + (for-each > + (lambda (file) > + (chmod file #o777)) > + (find-files dest))))) If you add (srfi srfi-26) to #:modules, you can express this more succintly with: (for-each (cut chmod <> #o777) (find-files dest)) > + (scandir elibdir > + (lambda (file) > + (and (not (member file '("." ".."))) > + (file-is-directory? (string-append elibdir "/" file))))))))) Please format the code to stay within 80 columns of text. 'guix lint' should report that. > + input-directories))) > + > + (replace 'check > + (lambda* (#:key tests? #:allow-other-keys) > + (when tests? > + (begin > + ;;(setenv "DEBUG" "1") > + (setenv "REBAR_CACHE_DIR" "/tmp") > + (invoke "make" "tests")))))) If the tests take time and they can not in parallel, the "-j" option should be provided with the (number->string (parallel-job-count)) value. > + #:make-flags > + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) > + "CC=gcc"))) This should use gexps as well, replacing the assoc-ref above with just #$output. -- Thanks, Maxim