From unknown Mon Jun 23 13:13:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#65313] [PATCH 0/1] gnu: Add erlang-lfe. Resent-From: Tim Johann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Aug 2023 15:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65313 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65313@debbugs.gnu.org Cc: Tim Johann X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16921130372476 (code B ref -1); Tue, 15 Aug 2023 15:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2023 15:23:57 +0000 Received: from localhost ([127.0.0.1]:36498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvtk-0000dq-Nd for submit@debbugs.gnu.org; Tue, 15 Aug 2023 11:23:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvti-0000de-OE for submit@debbugs.gnu.org; Tue, 15 Aug 2023 11:23:55 -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 1qVvtd-00036v-GM for guix-patches@gnu.org; Tue, 15 Aug 2023 11:23:49 -0400 Received: from ms-10.1blu.de ([178.254.4.101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVvtb-0004jw-5P for guix-patches@gnu.org; Tue, 15 Aug 2023 11:23:49 -0400 Received: from [176.199.211.189] (helo=dolos.fritz.box) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVvtW-0003MZ-Jw; Tue, 15 Aug 2023 17:23:42 +0200 From: Tim Johann Date: Tue, 15 Aug 2023 17:23:28 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Con-Id: 303810 X-Con-U: 0-t1m X-Originating-IP: 176.199.211.189 Received-SPF: pass client-ip=178.254.4.101; envelope-from=t1m@phrogstar.de; helo=ms-10.1blu.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Please, find attached a package definition for Lisp Flavoured Erlang. I am aware of the earlier attempt to package LFE by jgart [1] (since a few days), but I was already on track with everything, including the replacement of the 'check' phase, and did not take anything from that solution. I guess, that jgart's problem was the same as I encountered: while the binaries are built with a standard gnu Makefile, the tests use rebar3. rebar3 would download the dependencies instead of reusing existing Guix packages. My solution was 'inspired' by how the rebar3 build method handles dependencies. The rebar3-build-system links the dependencies to a subdirectory _checkouts from which the later _build directory is copied and used for fetching all rebar3 plugins, overriding the download locations in rebar.config [2,3]. But with linking the dependencies, the file permissions stay read-only, and with rebar trying multiple times to copy to _build, the 'check' phase would fail with permission denied. This is the reason for copying dependencies from the store, to be able to modify the permissions. [1] https://issues.guix.gnu.org/60372 [2] https://blog.erlware.org/rebar3-features-part-6-_checkouts-2/ [3] http://rebar3.org/docs/configuration/dependencies/ Tim Johann (1): * gnu/packages/erlang.scm (erlang-lfe): New variable. gnu/packages/erlang.scm | 77 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) base-commit: 2279e3e60479e91838db2d7261e86e91f9891650 -- 2.41.0 From unknown Mon Jun 23 13:13:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#65313] [PATCH 1/1] * gnu/packages/erlang.scm (erlang-lfe): New variable. Resent-From: Tim Johann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Aug 2023 15:28: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: 65313@debbugs.gnu.org Cc: Tim Johann Received: via spool by 65313-submit@debbugs.gnu.org id=B65313.16921132662844 (code B ref 65313); Tue, 15 Aug 2023 15:28:01 +0000 Received: (at 65313) by debbugs.gnu.org; 15 Aug 2023 15:27:46 +0000 Received: from localhost ([127.0.0.1]:36504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvxS-0000jo-Eo for submit@debbugs.gnu.org; Tue, 15 Aug 2023 11:27:46 -0400 Received: from ms-10.1blu.de ([178.254.4.101]:50734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvxO-0000je-Em for 65313@debbugs.gnu.org; Tue, 15 Aug 2023 11:27:45 -0400 Received: from [176.199.211.189] (helo=dolos.fritz.box) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVvxN-00083t-QZ; Tue, 15 Aug 2023 17:27:41 +0200 From: Tim Johann Date: Tue, 15 Aug 2023 17:27:32 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Con-Id: 303810 X-Con-U: 0-t1m X-Originating-IP: 176.199.211.189 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --- 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)) + (arguments + `(#: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"))) + (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))))) + (scandir elibdir + (lambda (file) + (and (not (member file '("." ".."))) + (file-is-directory? (string-append elibdir "/" file))))))))) + input-directories))) + + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (begin + ;;(setenv "DEBUG" "1") + (setenv "REBAR_CACHE_DIR" "/tmp") + (invoke "make" "tests")))))) + #:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out")) + "CC=gcc"))) + (home-page "https://github.com/lfe/lfe") + (synopsis "Lisp Flavoured Erlang") + (description + "LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang +compiler. Code produced with it is compatible with \"normal\" Erlang + code. An LFE evaluator and shell is also included.") + (license license:asl2.0))) -- 2.41.0 From unknown Mon Jun 23 13:13:24 2025 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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From unknown Mon Jun 23 13:13:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#65313] [PATCH 0/1] gnu: Add erlang-lfe. Resent-From: Tim Johann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Sep 2023 17:08:02 +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: Maxim Cournoyer Cc: 65313@debbugs.gnu.org Received: via spool by 65313-submit@debbugs.gnu.org id=B65313.169402002729532 (code B ref 65313); Wed, 06 Sep 2023 17:08:02 +0000 Received: (at 65313) by debbugs.gnu.org; 6 Sep 2023 17:07:07 +0000 Received: from localhost ([127.0.0.1]:37400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdvzf-0007gA-4Z for submit@debbugs.gnu.org; Wed, 06 Sep 2023 13:07:07 -0400 Received: from ms-10.1blu.de ([178.254.4.101]:34504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdvza-0007ff-Lo for 65313@debbugs.gnu.org; Wed, 06 Sep 2023 13:07:05 -0400 Received: from [46.114.105.21] (helo=dolos) by ms-10.1blu.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qdvzW-002g1k-Rc; Wed, 06 Sep 2023 19:06:59 +0200 From: Tim Johann Date: Wed, 06 Sep 2023 17:53:42 +0200 References: <874jk8lot5.fsf_-_@gmail.com> User-agent: mu4e 1.10.5; emacs 29.0.92 In-reply-to: <874jk8lot5.fsf_-_@gmail.com> Message-ID: <87tts7i633.fsf@phrogstar.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Con-Id: 303810 X-Con-U: 0-timjohann X-Originating-IP: 46.114.105.21 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Content-Disposition: inline Hi Maxim, Thanks for the review. I learned a lot. Is there more documentation on the #:modules specification? I would like to know if there is a variable containing the modules added to the builder file when not specifying #:modules in the arguments? Or do I need to repeat them there, as I have done so far: #:modules '((ice-9 ftw) (srfi srfi-26) (guix build gnu-build-system) (guix build utils)) The (guix build _) modules are the ones that are present when I don't use the #:modules argument. ftw is for 'scandir' and srfi-26 - as you suggested - for 'cut' Other than that, I have a working package declaration for erlang-lfe with your suggestions incorporated. I would just like to know the answer to above question, before I submit the revision. Thank you very much indeed. - Tim Maxim Cournoyer writes: > 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 contains many >> + ;; pre-compiled files, so we use this snapshot of the source >> + ;; repository. >> + (uri (git-reference >> + (url "") >> + (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. ------------------------------------------------------------------------ Tim Johann AIH Staff Scientist Klaus-Tschira-Institute for Computational Cardiology, Bioinformatics, Internal Medicine III University Hospital Heidelberg Im Neuenheimer Feld 669 D-69120 Heidelberg Tel.: (+49) 6221 56 39 12 6 *AI Health innovation Cluster* A collaboration of DKFZ, EMBL, Heidelberg University, Heidelberg University Hospital, University Hospital Mannheim, Central Institute of Mental Health, and the Max Planck Institute for Medical Research ------------------------------------------------------------------------ --=-=-=-- From unknown Mon Jun 23 13:13:24 2025 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: Wed, 06 Sep 2023 17:22: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.169402089631033 (code B ref 65313); Wed, 06 Sep 2023 17:22:01 +0000 Received: (at 65313) by debbugs.gnu.org; 6 Sep 2023 17:21:36 +0000 Received: from localhost ([127.0.0.1]:37484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdwDf-00084T-Vd for submit@debbugs.gnu.org; Wed, 06 Sep 2023 13:21:36 -0400 Received: from mail-qk1-x735.google.com ([2607:f8b0:4864:20::735]:45353) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdwDc-00084C-Dn for 65313@debbugs.gnu.org; Wed, 06 Sep 2023 13:21:35 -0400 Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-76e09202322so4522585a.3 for <65313@debbugs.gnu.org>; Wed, 06 Sep 2023 10:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694020885; x=1694625685; 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=CVRRqMKCbTvnDuqKY5pV2rVBl3FVwuhgsbuLV9siHHI=; b=mpjACqeIgzG2nW8jXfu5lSYRoPMRCrBCEZjrjF/0nIdOrj6XcJ2ywvW8+UhTutj2yH Bvkh6O6nWuQavIjOSt9Dlz87AFdW+EDdDGMhP7A6JI2Y0l+rWE7fZPSulsZYtG6ev3tZ mqj2wQ9WaY97xo5lni1qeJmfy54gog81F/V3C/nDGo565l4WrdM3k6DetUDLbGEDMLAh YLFGEhQzqpTYbS9cM28WjMxVpUuLDLuXm9hGLvgQA5bnG912JoZ/purYcioS61bxcjF8 4gLe07sAlcBHxYsx1QUOMT7wdFFarqTLaXsv4YY8wU1JDsgp1ZdCZjEaQ4N7P5UL4OcM gxrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694020885; x=1694625685; 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=CVRRqMKCbTvnDuqKY5pV2rVBl3FVwuhgsbuLV9siHHI=; b=FK0TDXx1a+IUlKL3PWJlwZWqriK7vp7vT8BIt523xmGzcCnlAFiI86ABIH9j5TWWmp 7Lw+eft6gRwJl8sweZ8rXaWjbFF0eBhd76bkHr8GdatCjWQpGPk13sdLKGKPhHraJpVD OziUDECF/4D7fmLs5UsnzS+EU9RU6uyXuNCOiZgakic3gzNGm3m9+0rONMjhRbriWN4r PHk7haVA+G/c2LLlLkJv4pMdZ6uT2Hy1P2uQZlsfFO09A5INfPiA+KrsRGemzBLzCF9X VAP+llk+eVBfJZ4kGZcAneJHZA/4pA9Ejiy4KKWmaas5fpkW05GJxY6kI7JFCCFBg3kY yQCg== X-Gm-Message-State: AOJu0YwuOKJG4BNd519VMuZKRfBtOqzojk5gAafzLQxYiml0Em7ehmmj NIkCZ4d8pfUaB0sHbGRqqiX2G+I9zrIJVA== X-Google-Smtp-Source: AGHT+IHYc12ZQCN/QxnrT8FE6vS8/Njhae3DXwgLYsEtk04gucihAndgOZml39qxJz0GVMo1N9HJqA== X-Received: by 2002:a0c:f003:0:b0:651:9fa8:9fd9 with SMTP id z3-20020a0cf003000000b006519fa89fd9mr18502393qvk.51.1694020885378; Wed, 06 Sep 2023 10:21:25 -0700 (PDT) Received: from hurd (dsl-153-125.b2b2c.ca. [66.158.153.125]) by smtp.gmail.com with ESMTPSA id j15-20020a0cc34f000000b00655935bca82sm1428521qvi.134.2023.09.06.10.21.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 10:21:24 -0700 (PDT) From: Maxim Cournoyer References: <874jk8lot5.fsf_-_@gmail.com> <87tts7i633.fsf@phrogstar.de> Date: Wed, 06 Sep 2023 13:21:23 -0400 In-Reply-To: <87tts7i633.fsf@phrogstar.de> (Tim Johann's message of "Wed, 06 Sep 2023 17:53:42 +0200") Message-ID: <875y4n5ib0.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-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Tim, Tim Johann writes: > Hi Maxim, > > Thanks for the review. I learned a lot. Happy to read it! > Is there more documentation on the #:modules specification? I would > like to know if there is a variable containing the modules added to > the builder file when not specifying #:modules in the arguments? Or > do I need to repeat them there, as I have done so far: > #:modules '((ice-9 ftw) > (srfi srfi-26) > (guix build gnu-build-system) > (guix build utils)) > > The (guix build _) modules are the ones that are present when I don't > use the #:modules argument. ftw is for 'scandir' and srfi-26 - as you > suggested - for 'cut' Your approach is the correct one. You have to look at the guix/build/*.scm files to see what are their default #:modules, and combine that value with the ones you want to add. For #:imported-modules (which is for external scheme modules to be made available in the environment), there are sometimes public variables that can be used. To make it more convenient, an improvement could be to either export public variables for the base modules for each build system, or we could go even farther and change the #:modules semantic so that it'd extend rather than override what the build systems uses by default. I hope that helps, -- Thanks, Maxim From unknown Mon Jun 23 13:13:24 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#65313] [PATCH v2] * gnu/packages/erlang.scm (erlang-lfe): New variable. References: In-Reply-To: Resent-From: Tim Johann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 06 Sep 2023 20:59: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: 65313@debbugs.gnu.org Cc: Tim Johann , maxim.cournoyer@gmail.com Received: via spool by 65313-submit@debbugs.gnu.org id=B65313.16940338887833 (code B ref 65313); Wed, 06 Sep 2023 20:59:01 +0000 Received: (at 65313) by debbugs.gnu.org; 6 Sep 2023 20:58:08 +0000 Received: from localhost ([127.0.0.1]:38002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdzbE-00022H-7W for submit@debbugs.gnu.org; Wed, 06 Sep 2023 16:58:08 -0400 Received: from ms-10.1blu.de ([178.254.4.101]:50848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdzbC-000228-7E for 65313@debbugs.gnu.org; Wed, 06 Sep 2023 16:58:07 -0400 Received: from [176.199.211.189] (helo=dolos.fritz.box) by ms-10.1blu.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qdzb9-00Af1u-Fw; Wed, 06 Sep 2023 22:58:03 +0200 From: Tim Johann Date: Wed, 6 Sep 2023 22:57:53 +0200 Message-ID: <43d67dfca58a7dd9384f5c566a50f3f647ce23ab.1694033873.git.t1m@phrogstar.de> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Con-Id: 303810 X-Con-U: 0-t1m X-Originating-IP: 176.199.211.189 X-Spam-Score: 3.6 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: --- gnu/packages/erlang.scm | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm index a7f161647b..b0ad4ea2a7 100644 --- a/gnu/packages/erlang.scm +++ b/gnu/packages/erlang.scm @@ -27,6 +27,7 @@ Content analysis details: (3.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [176.199.211.189 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.6 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: --- gnu/packages/erlang.scm | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm index a7f161647b..b0ad4ea2a7 100644 --- a/gnu/packages/erlang.scm +++ b/gnu/packages/erlang.scm @@ -27,6 +27,7 @@ Content analysis details: (2.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [176.199.211.189 listed in zen.spamhaus.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --- gnu/packages/erlang.scm | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm index a7f161647b..b0ad4ea2a7 100644 --- a/gnu/packages/erlang.scm +++ b/gnu/packages/erlang.scm @@ -27,6 +27,7 @@ (define-module (gnu packages erlang) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system emacs) #:use-module (guix build-system rebar) @@ -738,3 +739,74 @@ (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) + (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)) + (arguments + (list + #:modules '((ice-9 ftw) + (srfi srfi-26) + (guix build gnu-build-system) + (guix build utils)) + #: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) + (define input-directories + (list #$(this-package-native-input "rebar3-proper") + #$(this-package-native-input "erlang-proper"))) + (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 (cut chmod <> #o777) (find-files dest))))) + (scandir elibdir (lambda (file) + (and (not (member file '("." ".."))) + (file-is-directory? + (string-append elibdir + "/" + file))))))))) + input-directories))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (begin + (setenv "REBAR_CACHE_DIR" "/tmp") + (invoke "make" "-j" "tests")))))) + #:make-flags + #~(list (string-append "PREFIX=" #$output) "CC=gcc"))) + (home-page "https://github.com/lfe/lfe") + (synopsis "Lisp Flavoured Erlang") + (description + "LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang +compiler. Code produced with it is compatible with \"normal\" Erlang + code. An LFE evaluator and shell is also included.") + (license license:asl2.0))) base-commit: 65dcfb3f3865d08467da747041263fd22460d393 -- 2.41.0 From unknown Mon Jun 23 13:13:24 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tim Johann Subject: bug#65313: closed (Re: [PATCH v2] * gnu/packages/erlang.scm (erlang-lfe): New variable.) Message-ID: References: <87pm2uogqa.fsf@gmail.com> X-Gnu-PR-Message: they-closed 65313 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 65313@debbugs.gnu.org Date: Thu, 07 Sep 2023 02:33:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1694053982-28360-1" This is a multi-part message in MIME format... ------------=_1694053982-28360-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #65313: [PATCH 0/1] gnu: Add erlang-lfe. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 65313@debbugs.gnu.org. --=20 65313: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D65313 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1694053982-28360-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 65313-done) by debbugs.gnu.org; 7 Sep 2023 02:32:59 +0000 Received: from localhost ([127.0.0.1]:38213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qe4pG-0007NB-Uo for submit@debbugs.gnu.org; Wed, 06 Sep 2023 22:32:59 -0400 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:60860) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qe4pB-0007Mt-Rm for 65313-done@debbugs.gnu.org; Wed, 06 Sep 2023 22:32:57 -0400 Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-4122e42a76aso3852091cf.1 for <65313-done@debbugs.gnu.org>; Wed, 06 Sep 2023 19:32:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694053966; x=1694658766; 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=FKBU3rfwQywjag4nEUXqYVyeQQ2zWjlfXwqrxVfx6m4=; b=KMMPEIv/4vTBmjDiLB454lQwhEQK3r1/s12ixD13feAhAD/IN3QgDN1M8kh18LZl1o NDitVQN/+fTWKYqFb3f6N1I0m/Cq7cstmk2xDXB9KJHy6fZastPG8xAAi18tuTwhI19l WMlEltK0QC5YS1u3P95X1IjjgbaV0mR93JtuAs7/1LnL1fDat7OfCw8/Rwz2Xbvb6RG3 7d7jGKJo4SvswOj5Fez/P3KisZEyUu+zqc0egQRpgEtjis1F/shqo4cchRRqqh3EuvdI 1k82NEzPFMteold7SWss6VK0OSNvo/0n1O7cicm8PL+GAEe8vgmgTQ4Kqe4FqwtCRsu/ SVhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694053966; x=1694658766; 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=FKBU3rfwQywjag4nEUXqYVyeQQ2zWjlfXwqrxVfx6m4=; b=WZUjXZSW/mX2FmS98T7G2c+1AlywE+5q9qzkGWIOFue0+umpTbLJUjyFTP6ig3YxuR eNEOuZDdSbbKiGixZxqYGKYFzllKwfIx76cMgqBd0iwuCU0GiVI+IJSceV9k0q4qbMWB YHbT7UaS/hHPX3s6nfVEYjLB6scBJmSmso8CH1OzQDcEX/fdhDOjcHp8N0z/AWvy0c47 09tbuBmOMvcsfrlQgiiq+PIHUvyMn+KmPXecbKM5Zwv+0RoDa12OMqLK+G8+Ifm4lf1K vToFWZvJFAb7Lr5+BQ5apGmviWU88I/sSnOAYAIh8y90ipc7xOiEOhFJsfHUZyzc9Jdl m/VQ== X-Gm-Message-State: AOJu0YzHpssd+WJkhSK6JZLHMHz3f/VzpbwFfZ4U9pKd/+6uR4yqrnBC 0nVfB5rxt8YxOPUcTGQIlpkrQkm7PGPAFw== X-Google-Smtp-Source: AGHT+IEZ1PLpm4veAglRl3luKIfrUTS91/dEKLwVCCHbt9181ZWdw12ahUuo4nAdILhNx24/Kawkqw== X-Received: by 2002:ac8:5b4e:0:b0:3f6:bb5b:8111 with SMTP id n14-20020ac85b4e000000b003f6bb5b8111mr22773654qtw.60.1694053966571; Wed, 06 Sep 2023 19:32:46 -0700 (PDT) Received: from hurd (dsl-153-125.b2b2c.ca. [66.158.153.125]) by smtp.gmail.com with ESMTPSA id y22-20020ac87c96000000b00410538a2e74sm5059035qtv.16.2023.09.06.19.32.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Sep 2023 19:32:46 -0700 (PDT) From: Maxim Cournoyer To: Tim Johann Subject: Re: [PATCH v2] * gnu/packages/erlang.scm (erlang-lfe): New variable. References: <43d67dfca58a7dd9384f5c566a50f3f647ce23ab.1694033873.git.t1m@phrogstar.de> Date: Wed, 06 Sep 2023 22:32:45 -0400 In-Reply-To: <43d67dfca58a7dd9384f5c566a50f3f647ce23ab.1694033873.git.t1m@phrogstar.de> (Tim Johann's message of "Wed, 6 Sep 2023 22:57:53 +0200") Message-ID: <87pm2uogqa.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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65313-done Cc: 65313-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Tim, Tim Johann writes: > --- > gnu/packages/erlang.scm | 72 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 72 insertions(+) I've adjusted the commit message like so: --8<---------------cut here---------------start------------->8--- gnu: Add erlang-lfe. * gnu/packages/erlang.scm (erlang-lfe): New variable. --8<---------------cut here---------------end--------------->8--- Made other small cosmetic changes such as moving the #:make-flags above the #:phases, the inputs after the build arguments, added a copyright line with your name, and installed it with commit 5ef28595e. Thank you for your contribution! -- Maxim ------------=_1694053982-28360-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Aug 2023 15:23:57 +0000 Received: from localhost ([127.0.0.1]:36498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvtk-0000dq-Nd for submit@debbugs.gnu.org; Tue, 15 Aug 2023 11:23:57 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvti-0000de-OE for submit@debbugs.gnu.org; Tue, 15 Aug 2023 11:23:55 -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 1qVvtd-00036v-GM for guix-patches@gnu.org; Tue, 15 Aug 2023 11:23:49 -0400 Received: from ms-10.1blu.de ([178.254.4.101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVvtb-0004jw-5P for guix-patches@gnu.org; Tue, 15 Aug 2023 11:23:49 -0400 Received: from [176.199.211.189] (helo=dolos.fritz.box) by ms-10.1blu.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVvtW-0003MZ-Jw; Tue, 15 Aug 2023 17:23:42 +0200 From: Tim Johann To: guix-patches@gnu.org Subject: [PATCH 0/1] gnu: Add erlang-lfe. Date: Tue, 15 Aug 2023 17:23:28 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Con-Id: 303810 X-Con-U: 0-t1m X-Originating-IP: 176.199.211.189 Received-SPF: pass client-ip=178.254.4.101; envelope-from=t1m@phrogstar.de; helo=ms-10.1blu.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: Tim Johann X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Please, find attached a package definition for Lisp Flavoured Erlang. I am aware of the earlier attempt to package LFE by jgart [1] (since a few days), but I was already on track with everything, including the replacement of the 'check' phase, and did not take anything from that solution. I guess, that jgart's problem was the same as I encountered: while the binaries are built with a standard gnu Makefile, the tests use rebar3. rebar3 would download the dependencies instead of reusing existing Guix packages. My solution was 'inspired' by how the rebar3 build method handles dependencies. The rebar3-build-system links the dependencies to a subdirectory _checkouts from which the later _build directory is copied and used for fetching all rebar3 plugins, overriding the download locations in rebar.config [2,3]. But with linking the dependencies, the file permissions stay read-only, and with rebar trying multiple times to copy to _build, the 'check' phase would fail with permission denied. This is the reason for copying dependencies from the store, to be able to modify the permissions. [1] https://issues.guix.gnu.org/60372 [2] https://blog.erlware.org/rebar3-features-part-6-_checkouts-2/ [3] http://rebar3.org/docs/configuration/dependencies/ Tim Johann (1): * gnu/packages/erlang.scm (erlang-lfe): New variable. gnu/packages/erlang.scm | 77 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) base-commit: 2279e3e60479e91838db2d7261e86e91f9891650 -- 2.41.0 ------------=_1694053982-28360-1--