GNU bug report logs - #60372
[PATCH] gnu: lisp: Add lfe.

Previous Next

Package: guix-patches;

Reported by: jgart <jgart <at> dismail.de>

Date: Wed, 28 Dec 2022 01:53:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: "jgart" <jgart <at> dismail.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60372 in the body.
You can then email your comments to 60372 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#60372; Package guix-patches. (Wed, 28 Dec 2022 01:53:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to jgart <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 28 Dec 2022 01:53:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: guix-patches <at> gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH] gnu: lisp: Add lfe.
Date: Tue, 27 Dec 2022 19:52:19 -0600
* gnu/packages/lisp.scm (lfe): New variable.
---
 gnu/packages/lisp.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 753952152e..5919a6017e 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -66,6 +66,7 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages ed)
+  #:use-module (gnu packages erlang)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
@@ -1228,6 +1229,40 @@ (define-public picolisp
        (inherit picolisp32)
        (name "picolisp")))))
 
+(define-public lfe
+  (package
+    (name "lfe")
+    (version "2.0.1")
+    (source 
+      (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/lfe/lfe")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a5cfnk3021idvv4bv2lvnksjy9d0yyd13bnj793ks86j5f3hdv5"))))
+    (build-system gnu-build-system)
+    (propagated-inputs (list erlang))
+    (arguments 
+      (list #:tests? #f
+            #:make-flags
+            #~(list (string-append "PREFIX=" #$output))
+            #:phases
+            #~(modify-phases %standard-phases
+                (delete 'configure)
+                ;; https://github.com/lfe/lfe/pull/449
+                (add-after 'unpack 'patch-gcc
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (substitute* "Makefile"
+                      (("cc") #$(cc-for-target))))))))
+    (synopsis "Lisp Flavoured Erlang")
+    (description "LFE, Lisp Flavoured Erlang, is a lisp syntax front-end
+to the Erlang compiler.  Code produced with LFE is compatible with normal
+Erlang code.  An @code{lfe} evaluator and shell is also included.")
+    (home-page "https://lfe.io/")
+    (license license:asl2.0)))
+
 (define-public janet
   (package
     (name "janet")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60372; Package guix-patches. (Wed, 28 Dec 2022 04:11:02 GMT) Full text and rfc822 format available.

Message #8 received at 60372 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 60372 <at> debbugs.gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: [PATCH v2] gnu: lisp: Add lfe.
Date: Tue, 27 Dec 2022 22:05:46 -0600
* gnu/packages/lisp.scm (lfe): New variable.

Here's a v2 but this a WIP as the tests are disabled. Unless we can
merge this and enable the tests later after we figure out whether we
want to do that with rebar-build-system or via a custom phase?

I have an issue open here asking about running the tests:

https://github.com/lfe/lfe/issues/450

I tried running the tests by manually calling rebar but I get a homeless-shelter write error.

For test commands that I tried see the following section in the lfe project's CI:

https://github.com/lfe/lfe/blob/develop/.github/workflows/cicd.yml#L36

If anyone would like to collaborate on this patch feel free to make
changes and just list me as co-author with you.

all best,

jgart
---
 gnu/packages/lisp.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 753952152e..67105a5c93 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -66,6 +66,7 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages ed)
+  #:use-module (gnu packages erlang)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
@@ -1228,6 +1229,40 @@ (define-public picolisp
        (inherit picolisp32)
        (name "picolisp")))))
 
+(define-public lfe
+  (package
+    (name "lfe")
+    (version "2.0.1")
+    (source 
+      (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/lfe/lfe")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a5cfnk3021idvv4bv2lvnksjy9d0yyd13bnj793ks86j5f3hdv5"))))
+    (build-system gnu-build-system)
+    (inputs (list erlang))
+    (arguments 
+      (list #:tests? #f
+            #:make-flags
+            #~(list (string-append "PREFIX=" #$output))
+            #:phases
+            #~(modify-phases %standard-phases
+                (delete 'configure)
+                ;; https://github.com/lfe/lfe/pull/449
+                (add-after 'unpack 'patch-gcc
+                  (lambda* (#:key inputs #:allow-other-keys)
+                    (substitute* "Makefile"
+                      (("cc") #$(cc-for-target))))))))
+    (synopsis "Lisp Flavoured Erlang")
+    (description "LFE, Lisp Flavoured Erlang, is a lisp syntax front-end
+to the Erlang compiler.  Code produced with LFE is compatible with normal
+Erlang code.  An @code{lfe} evaluator and shell is also included.")
+    (home-page "https://lfe.io/")
+    (license license:asl2.0)))
+
 (define-public janet
   (package
     (name "janet")
-- 
2.38.1





Information forwarded to guix-patches <at> gnu.org:
bug#60372; Package guix-patches. (Tue, 21 Mar 2023 14:27:02 GMT) Full text and rfc822 format available.

Message #11 received at 60372 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: jgart <jgart <at> dismail.de>
Cc: 60372 <at> debbugs.gnu.org
Subject: Re: bug#60372: [PATCH] gnu: lisp: Add lfe.
Date: Tue, 21 Mar 2023 10:25:51 -0400
Hi,

jgart <jgart <at> dismail.de> writes:

> * gnu/packages/lisp.scm (lfe): New variable.

I think that should go in (gnu packages erlang).  Also, the convention
is to use just 'gnu: ' as prefix, not 'gnu: module:'.

> Here's a v2 but this a WIP as the tests are disabled. Unless we can
> merge this and enable the tests later after we figure out whether we
> want to do that with rebar-build-system or via a custom phase?
>
> I have an issue open here asking about running the tests:
>
> https://github.com/lfe/lfe/issues/450
>
> I tried running the tests by manually calling rebar but I get a homeless-shelter write error.

You could try setting HOME to /tmp.  Search for existing set-HOME
phases in the code base.

> For test commands that I tried see the following section in the lfe project's CI:
>
> https://github.com/lfe/lfe/blob/develop/.github/workflows/cicd.yml#L36
>
> If anyone would like to collaborate on this patch feel free to make
> changes and just list me as co-author with you.
>
> all best,
>
> jgart
> ---
>  gnu/packages/lisp.scm | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
> index 753952152e..67105a5c93 100644
> --- a/gnu/packages/lisp.scm
> +++ b/gnu/packages/lisp.scm
> @@ -66,6 +66,7 @@ (define-module (gnu packages lisp)
>    #:use-module (gnu packages compression)
>    #:use-module (gnu packages dbm)
>    #:use-module (gnu packages ed)
> +  #:use-module (gnu packages erlang)
>    #:use-module (gnu packages fontutils)
>    #:use-module (gnu packages gcc)
>    #:use-module (gnu packages gettext)
> @@ -1228,6 +1229,40 @@ (define-public picolisp
>         (inherit picolisp32)
>         (name "picolisp")))))
>
> +(define-public lfe
> +  (package
> +    (name "lfe")
> +    (version "2.0.1")
> +    (source
> +      (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "https://github.com/lfe/lfe")
> +             (commit version)))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0a5cfnk3021idvv4bv2lvnksjy9d0yyd13bnj793ks86j5f3hdv5"))))
> +    (build-system gnu-build-system)
> +    (inputs (list erlang))
> +    (arguments
> +      (list #:tests? #f
> +            #:make-flags
> +            #~(list (string-append "PREFIX=" #$output))
> +            #:phases
> +            #~(modify-phases %standard-phases
> +                (delete 'configure)
> +                ;; https://github.com/lfe/lfe/pull/449
> +                (add-after 'unpack 'patch-gcc
> +                  (lambda* (#:key inputs #:allow-other-keys)
> +                    (substitute* "Makefile"
> +                      (("cc") #$(cc-for-target))))))))

You can set 'cc' as a Make flag; that'd be more elegant.

-- 
Thanks,
Maxim




Added tag(s) moreinfo. Request was from Maxim Cournoyer <maxim.cournoyer <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 21 Mar 2023 14:27:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#60372; Package guix-patches. (Tue, 21 Mar 2023 14:33:01 GMT) Full text and rfc822 format available.

Message #16 received at 60372 <at> debbugs.gnu.org (full text, mbox):

From: "jgart" <jgart <at> dismail.de>
To: "Maxim Cournoyer" <maxim.cournoyer <at> gmail.com>
Cc: 60372 <at> debbugs.gnu.org
Subject: Re: bug#60372: [PATCH] gnu: lisp: Add lfe.
Date: Tue, 21 Mar 2023 14:32:14 +0000
Hi Maxim,

Thanks for the review.

I think this will need to be written in terms of the rebar-build-system:

https://github.com/lfe/lfe/issues/441

Otherwise, it might be painful to run the tests. Even upstream is unsure of how to run the tests if building with a Makefile.

Just leaving this additional note here for when I get back to this.

all best,

jgart




Reply sent to "jgart" <jgart <at> dismail.de>:
You have taken responsibility. (Tue, 18 Jun 2024 06:07:01 GMT) Full text and rfc822 format available.

Notification sent to jgart <jgart <at> dismail.de>:
bug acknowledged by developer. (Tue, 18 Jun 2024 06:07:02 GMT) Full text and rfc822 format available.

Message #21 received at 60372-done <at> debbugs.gnu.org (full text, mbox):

From: "jgart" <jgart <at> dismail.de>
To: 60372-done <at> debbugs.gnu.org
Date: Tue, 18 Jun 2024 06:06:03 +0000
This is already resolved




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Jul 2024 11:24:21 GMT) Full text and rfc822 format available.

This bug report was last modified 297 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.