GNU bug report logs - #57348
[PATCH] gnu: Add eisl

Previous Next

Package: guix-patches;

Reported by: Joeke <joeke <at> posteo.net>

Date: Mon, 22 Aug 2022 23:00:02 UTC

Severity: normal

Tags: patch

Done: Guillaume Le Vaillant <glv <at> posteo.net>

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 57348 in the body.
You can then email your comments to 57348 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#57348; Package guix-patches. (Mon, 22 Aug 2022 23:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joeke <joeke <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 22 Aug 2022 23:00:02 GMT) Full text and rfc822 format available.

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

From: Joeke <joeke <at> posteo.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add eisl
Date: Mon, 22 Aug 2022 22:58:53 +0000
[Message part 1 (text/plain, inline)]
This patch adds the Easy ISLisp interpreter/compiler for ISLisp to
lisp.scm

[0001-gnu-Add-eisl.patch (text/x-patch, inline)]
From ba1e8d927d081de4169d188c772adb2cdc79b57c Mon Sep 17 00:00:00 2001
From: Joeke de Graaf <joeke <at> posteo.net>
Date: Tue, 23 Aug 2022 00:45:40 +0200
Subject: [PATCH] gnu: Add eisl

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

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 2f37b82..79fae67 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Paul A. Patience <paul <at> apatience.com>
 ;;; Copyright © 2021 Charles Jackson <charles.b.jackson <at> protonmail.com>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2022 Joeke de Graaf <joeke <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +60,7 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages ed)
   #:use-module (gnu packages fontutils)
@@ -1351,3 +1353,43 @@ (define-public buildapp
      "Buildapp is an application for SBCL or CCL that configures and saves an
 executable Common Lisp image.  It is similar to cl-launch and hu.dwim.build.")
     (license license:bsd-2)))
+
+
+(define-public eisl
+  (package
+    (name "eisl")
+    (version "2.60")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/sasagawa888/eisl")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "0qrmy6myyac38q3kf26axmxpmq9srhc6qy0ykfcsng50jzcdg1mn"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     (list gcc ncurses cppcheck))
+    (arguments
+     `(#:modules
+       ((guix build utils)
+        (guix build gnu-build-system))
+
+       #:make-flags
+       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             (string-append "CC=" ,(cc-for-target)))
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'create-store-directory
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref %outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p out)
+               (mkdir-p bin))))
+         (delete 'configure))))
+    (home-page "https://github.com/sasagawa888/eisl")
+    (synopsis "Implementation of ISLisp")
+    (description "Easy ISLISP (eisl) is an implementation of ISLisp which
+includes a compiler as well as an interpreter.")
+    (license license:bsd-2)))
-- 
2.37.2

[Message part 3 (text/plain, inline)]
Best regards,

Joeke de Graaf

Information forwarded to guix-patches <at> gnu.org:
bug#57348; Package guix-patches. (Sat, 27 Aug 2022 11:20:01 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Joeke <joeke <at> posteo.net>
Cc: 57348 <at> debbugs.gnu.org
Subject: Re: [bug#57348] [PATCH] gnu: Add eisl
Date: Sat, 27 Aug 2022 11:07:21 +0000
[Message part 1 (text/plain, inline)]
Hi,

Joeke <joeke <at> posteo.net> skribis:

> This patch adds the Easy ISLisp interpreter/compiler for ISLisp to
> lisp.scm
>
> [...]
>
> +    (build-system gnu-build-system)
> +    (native-inputs
> +     (list gcc ncurses cppcheck))

Adding gcc to 'native-inputs' is not necessary, and ncurses should
probably be in 'inputs' instead of 'native-inputs'.

> +    (arguments
> +     `(#:modules
> +       ((guix build utils)
> +        (guix build gnu-build-system))

Specifying 'modules' here is not necessary.

>
> [...]
>
> +    (home-page "https://github.com/sasagawa888/eisl")
> +    (synopsis "Implementation of ISLisp")
> +    (description "Easy ISLISP (eisl) is an implementation of ISLisp which
> +includes a compiler as well as an interpreter.")
> +    (license license:bsd-2)))

It looks like some code in "cii/" is under the expat license, and some
code in "nana/" is under bsd-3, so they should be added to the 'license'
field.

Also, it looks like the files in "library/" are not compiled/installed.
Is it on purpose?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57348; Package guix-patches. (Tue, 30 Aug 2022 19:39:01 GMT) Full text and rfc822 format available.

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

From: Joeke <joeke <at> posteo.net>
To: 57348 <at> debbugs.gnu.org
Subject: Re: [bug#57348] [PATCH] gnu: Add eisl
Date: Tue, 30 Aug 2022 19:38:28 +0000
[Message part 1 (text/plain, inline)]
Hi,

Guillaume Le Vaillant <glv <at> posteo.net> writes:

>> +    (build-system gnu-build-system)
>> +    (native-inputs
>> +     (list gcc ncurses cppcheck))
>
> Adding gcc to 'native-inputs' is not necessary, and ncurses should
> probably be in 'inputs' instead of 'native-inputs'.

Right, fixed.

>> +    (arguments
>> +     `(#:modules
>> +       ((guix build utils)
>> +        (guix build gnu-build-system))
>
> Specifying 'modules' here is not necessary.

I removed this as well.

>> +    (home-page "https://github.com/sasagawa888/eisl")
>> +    (synopsis "Implementation of ISLisp")
>> +    (description "Easy ISLISP (eisl) is an implementation of ISLisp which
>> +includes a compiler as well as an interpreter.")
>> +    (license license:bsd-2)))
>
> It looks like some code in "cii/" is under the expat license, and some
> code in "nana/" is under bsd-3, so they should be added to the 'license'
> field.

You're right. I also found some gpl2+ code under nana/.


> Also, it looks like the files in "library/" are not compiled/installed.
> Is it on purpose?

This certainly was not intentional. In my new patch I somewhat hackily
copy the "library" and "bench" directories over to the output
directory. If there is a better way to do this, please let me know.


Dankon por la revizio,


Joeke de Graaf

[0001-gnu-Add-eisl.patch (text/x-patch, inline)]
From 0162b638d42d02b4ed11db77b2ad46179f673f03 Mon Sep 17 00:00:00 2001
From: Joeke de Graaf <joeke <at> posteo.net>
Date: Tue, 30 Aug 2022 21:27:24 +0200
Subject: [PATCH] gnu: Add eisl

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

diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 2f37b82..ad57d45 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2021 Paul A. Patience <paul <at> apatience.com>
 ;;; Copyright © 2021 Charles Jackson <charles.b.jackson <at> protonmail.com>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2022 Joeke de Graaf <joeke <at> posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +60,7 @@ (define-module (gnu packages lisp)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages bdw-gc)
+  #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages ed)
   #:use-module (gnu packages fontutils)
@@ -1351,3 +1353,60 @@ (define-public buildapp
      "Buildapp is an application for SBCL or CCL that configures and saves an
 executable Common Lisp image.  It is similar to cl-launch and hu.dwim.build.")
     (license license:bsd-2)))
+
+
+(define-public eisl
+  (package
+    (name "eisl")
+    (version "2.60")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/sasagawa888/eisl")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32 "0qrmy6myyac38q3kf26axmxpmq9srhc6qy0ykfcsng50jzcdg1mn"))))
+    (build-system gnu-build-system)
+    (inputs
+     (list ncurses))
+    (native-inputs
+     (list cppcheck))
+    (arguments
+     `(#:make-flags
+       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+             (string-append "CC=" ,(cc-for-target)))
+
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'install 'create-store-directory
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref %outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (lib (string-append out "/library"))
+                    (ben (string-append out "/bench")))
+               (map mkdir-p (list out bin lib ben)))))
+         (add-after 'install 'install-lib-and-bench
+           (lambda* (#:key build-inputs outputs #:allow-other-keys)
+             (let* ((source (assoc-ref %build-inputs "source"))
+                    (out (assoc-ref %outputs "out"))
+                    (libstring "/library/")
+                    (benchstring "/bench/"))
+               (map (lambda (subdir-name)
+                      (let ((sourcedir (opendir (string-append source subdir-name))))
+                        (do ((file (readdir sourcedir) (readdir sourcedir)))
+                            ((eof-object? file))
+                          (when (not (member file '("." "..")))
+                            (copy-file (string-append source subdir-name file)
+				        (string-append out subdir-name file))))))
+                    (list libstring benchstring)))))
+         (delete 'configure))))
+    (home-page "https://github.com/sasagawa888/eisl")
+    (synopsis "Implementation of ISLisp")
+    (description "Easy ISLISP (eisl) is an implementation of ISLisp which
+includes a compiler as well as an interpreter.")
+    (license (list license:bsd-2 ;; documents/license.txt
+                   license:expat ;; cii/LICENSE
+                   license:gpl2+ ;; nana/gdb/test.c and others under nana/
+                   license:bsd-3 ;; bench/*
+))))
-- 
2.37.2


Information forwarded to guix-patches <at> gnu.org:
bug#57348; Package guix-patches. (Wed, 31 Aug 2022 12:05:02 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Joeke <joeke <at> posteo.net>
Cc: 57348 <at> debbugs.gnu.org
Subject: Re: [bug#57348] [PATCH] gnu: Add eisl
Date: Wed, 31 Aug 2022 11:58:22 +0000
[Message part 1 (text/plain, inline)]
Joeke <joeke <at> posteo.net> skribis:

>> Also, it looks like the files in "library/" are not compiled/installed.
>> Is it on purpose?
>
> This certainly was not intentional. In my new patch I somewhat hackily
> copy the "library" and "bench" directories over to the output
> directory. If there is a better way to do this, please let me know.

Apparently upstream has recently added fixes to the makefile concerning
the "library" directory, but there are still a few things to fix
(see <https://github.com/sasagawa888/eisl/issues/215>).
[signature.asc (application/pgp-signature, inline)]

Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Sat, 03 Sep 2022 14:09:02 GMT) Full text and rfc822 format available.

Notification sent to Joeke <joeke <at> posteo.net>:
bug acknowledged by developer. (Sat, 03 Sep 2022 14:09:02 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Joeke <joeke <at> posteo.net>
Cc: 57348-done <at> debbugs.gnu.org
Subject: Re: [bug#57348] [PATCH] gnu: Add eisl
Date: Sat, 03 Sep 2022 14:03:27 +0000
[Message part 1 (text/plain, inline)]
I updated your patch for version 2.62 which has the fixes for the
libraries. I also added a 'wrap' phase, so calling "(compile-file ...)"
should work without having to propagate gcc-toolchain etc.
Patch pushed as 5cf9b98d1cdd25ee44224f8256ea6f719b9aa0bd.
Thanks.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Oct 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 218 days ago.

Previous Next


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