unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#43183] [PATCH] gnu: Add loko-scheme.
@ 2020-09-03 15:02 Martin Becze
  2020-09-04  6:43 ` Mathieu Othacehe
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-03 15:02 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/loko.scm (loko-scheme): New variable.
---
 gnu/local.mk          |   2 +
 gnu/packages/loko.scm | 124 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 126 insertions(+)
 create mode 100644 gnu/packages/loko.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 6e47d74e0a..fef66aea19 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -36,6 +36,7 @@
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 # Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 # Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
+# Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 #
 # This file is part of GNU Guix.
 #
@@ -342,6 +343,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/lout.scm				\
   %D%/packages/logging.scm			\
   %D%/packages/logo.scm				\
+  %D%/packages/loko.scm				\
   %D%/packages/lolcode.scm                      \
   %D%/packages/lsof.scm				\
   %D%/packages/lua.scm				\
diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm
new file mode 100644
index 0000000000..4830b845c9
--- /dev/null
+++ b/gnu/packages/loko.scm
@@ -0,0 +1,124 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages loko)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages package-management)
+  #:use-module (gnu packages chez))
+
+(define pfds
+  (let ((name "pfds")
+	(version "0.3"))
+      (origin
+	(method git-fetch)
+	(uri (git-reference
+	      (url "https://github.com/ijp/pfds.git")
+	      (commit (string-append "v" version))))
+	(file-name (git-file-name name version))
+	(sha256
+	 (base32 "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh")))))
+
+(define machine-code
+  (let ((name "machine-code")
+	(version "2.1.0"))
+      (origin
+	(method git-fetch)
+	(uri (git-reference
+	      (url "https://github.com/weinholt/machine-code.git")
+	      (commit (string-append "v" version))))
+	(file-name (git-file-name name version))
+	(sha256
+	 (base32 "0wzj3caj2jypzyjqfkfqkvr3kkbjabsnhldv9kvnx9w9qnria5yd")))))
+
+(define struct-pack
+  (let ((name "struct-pack")
+	(version "1.1.1"))
+      (origin
+	(method git-fetch)
+	(uri (git-reference
+	      (url "https://github.com/weinholt/struct-pack.git")
+	      (commit (string-append "v" version))))
+	(file-name (git-file-name name version))
+	(sha256
+	 (base32 "0hd72m821pahjphzyjn26i55542v8makr55xzjll2cycja4wsbc1")))))
+
+(define laesare
+  (let ((name "laesare")
+	(version "1.0.0"))
+      (origin
+	(method git-fetch)
+	(uri (git-reference
+	      (url "https://github.com/weinholt/laesare.git")
+	      (commit (string-append "v" version))))
+	(file-name (git-file-name name version))
+	(sha256
+	 (base32 "15q619gzw717r8r1ql23zfdaibpnp9qqs96032vdc3rj74msxc92")))))
+
+(define-public loko-scheme
+  (package
+    (name "loko-scheme")
+    (version "0.6.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://gitlab.com/weinholt/loko.git")
+                    (commit (string-append "v" version))))
+              (sha256 (base32 "019jlh3lywy912cfz689c9fxgf4bi5700i9k04g7sl5w5gchj36m"))
+              (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:strip-binaries? #f
+       #:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list
+          (string-append "PREFIX=" out)
+          (string-append "GDB_AUTOLOAD_PATH=" out "/share/gdb/auto-load")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'akku-fixes
+           (lambda* (#:key inputs #:allow-other-keys)
+             (delete-file "Akku.lock")
+             (substitute* "Akku.manifest"
+               (("\\(depends.*") "(depends)"))
+             (invoke "akku" "install")
+             (symlink (assoc-ref inputs "struct-pack") "./.akku/lib/struct")
+             (symlink (assoc-ref inputs "laesare") "./.akku/lib/laesare")
+             (symlink (assoc-ref inputs "machine-code") "./.akku/lib/machine-code")
+             (symlink (assoc-ref inputs "pfds") "./.akku/lib/pfds")
+             (substitute* ".akku/env"
+               (("/bin/sh") (which "sh")))
+             #t)))))
+    (native-inputs
+     `(("akku" ,akku)
+       ("chez-scheme" ,chez-scheme)
+       ("struct-pack" ,struct-pack)
+       ("laesare" ,laesare)
+       ("pfds" ,pfds)
+       ("machine-code" ,machine-code)))
+    (home-page "https://scheme.fail")
+    (synopsis "Implementation of the algorithmic language Scheme")
+    (description
+     "Loko Scheme is intended to be a platform for application and operating system
+development.  It is written purely in Scheme and some assembler (i.e. no C code at
+the bottom).  Both the R6RS and the R7RS standards are supported.")
+    (license license:agpl3+)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH] gnu: Add loko-scheme.
  2020-09-03 15:02 [bug#43183] [PATCH] gnu: Add loko-scheme Martin Becze
@ 2020-09-04  6:43 ` Mathieu Othacehe
  2020-09-04  6:49   ` Martin Becze
  2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
  2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
  2 siblings, 1 reply; 20+ messages in thread
From: Mathieu Othacehe @ 2020-09-04  6:43 UTC (permalink / raw)
  To: Martin Becze; +Cc: 43183


Hello Martin,

Thanks for this patch.

> +(define pfds
> +  (let ((name "pfds")
> +	(version "0.3"))
> +      (origin
> +	(method git-fetch)

There's a space/tab indentation mix here and in the other origin
declarations.

> +	(uri (git-reference
> +	      (url "https://github.com/ijp/pfds.git")
> +	      (commit (string-append "v" version))))

This could be useful not only for Loko but also for other scheme
implementations. Thus, it would be nice to define it as a proper package
rather than a simple origin.

> +              (sha256 (base32 "019jlh3lywy912cfz689c9fxgf4bi5700i9k04g7sl5w5gchj36m"))

This is usually wrapped to stay under the 78 columns limit.

> +              (file-name (git-file-name name version))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f

You should add a comment explaining why tests are disabled.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH] gnu: Add loko-scheme.
  2020-09-04  6:43 ` Mathieu Othacehe
@ 2020-09-04  6:49   ` Martin Becze
  2020-09-04  7:16     ` Mathieu Othacehe
  0 siblings, 1 reply; 20+ messages in thread
From: Martin Becze @ 2020-09-04  6:49 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 43183

That is very true. But I'm not sure how to make a generic scheme
package. Guile, Chez and loko all have different directories that they
look for libraries in. Since Guile is the most popular wdyt about just
having those as guile packages to start with?

On 9/4/20 1:43 AM, Mathieu Othacehe wrote:
> This could be useful not only for Loko but also for other scheme
> implementations. Thus, it would be nice to define it as a proper package
> rather than a simple origin.




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH] gnu: Add loko-scheme.
  2020-09-04  6:49   ` Martin Becze
@ 2020-09-04  7:16     ` Mathieu Othacehe
  2020-09-04  7:33       ` Ricardo Wurmus
  0 siblings, 1 reply; 20+ messages in thread
From: Mathieu Othacehe @ 2020-09-04  7:16 UTC (permalink / raw)
  To: Martin Becze; +Cc: 43183


> That is very true. But I'm not sure how to make a generic scheme
> package. Guile, Chez and loko all have different directories that they
> look for libraries in. Since Guile is the most popular wdyt about just
> having those as guile packages to start with?

Sure, this would be a good start.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH] gnu: Add loko-scheme.
  2020-09-04  7:16     ` Mathieu Othacehe
@ 2020-09-04  7:33       ` Ricardo Wurmus
  0 siblings, 0 replies; 20+ messages in thread
From: Ricardo Wurmus @ 2020-09-04  7:33 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 43183, Martin Becze


Mathieu Othacehe <othacehe@gnu.org> writes:

>> That is very true. But I'm not sure how to make a generic scheme
>> package. Guile, Chez and loko all have different directories that they
>> look for libraries in. Since Guile is the most popular wdyt about just
>> having those as guile packages to start with?
>
> Sure, this would be a good start.

We already have a guile-pfds package in (gnu packages guile-xyz).

-- 
Ricardo




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 0/5] gnu: Add loko-scheme.
  2020-09-03 15:02 [bug#43183] [PATCH] gnu: Add loko-scheme Martin Becze
  2020-09-04  6:43 ` Mathieu Othacehe
@ 2020-09-04 20:25 ` Martin Becze
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 1/5] " Martin Becze
                     ` (4 more replies)
  2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
  2 siblings, 5 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-04 20:25 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

Hi,
This packages loko-scheme and the scheme libraries need to build it.

Martin Becze (5):
  gnu: Add loko-scheme.
  gnu: guile-pfds: When using Guile 3, compile as a r6rs library.
  gnu: Add guile-struct-pack.
  gnu: Add guile-machine-code.
  gnu: Add guile-laesare.

 gnu/local.mk               |   2 +
 gnu/packages/guile-xyz.scm | 161 ++++++++++++++++++++++++++++++++++---
 gnu/packages/loko.scm      |  84 +++++++++++++++++++
 3 files changed, 235 insertions(+), 12 deletions(-)
 create mode 100644 gnu/packages/loko.scm

-- 
2.28.0





^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 1/5] gnu: Add loko-scheme.
  2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
@ 2020-09-04 20:25   ` Martin Becze
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library Martin Becze
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-04 20:25 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/loko.scm (loko-scheme): New variable.
---
 gnu/local.mk          |  2 ++
 gnu/packages/loko.scm | 84 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100644 gnu/packages/loko.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index d2753f52ae..96a849b7a4 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -36,6 +36,7 @@
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 # Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 # Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
+# Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 #
 # This file is part of GNU Guix.
 #
@@ -342,6 +343,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/lout.scm				\
   %D%/packages/logging.scm			\
   %D%/packages/logo.scm				\
+  %D%/packages/loko.scm				\
   %D%/packages/lolcode.scm                      \
   %D%/packages/lsof.scm				\
   %D%/packages/lua.scm				\
diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm
new file mode 100644
index 0000000000..ad4396afc4
--- /dev/null
+++ b/gnu/packages/loko.scm
@@ -0,0 +1,84 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages loko)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages package-management)
+  #:use-module (gnu packages guile)
+  #:use-module (gnu packages guile-xyz)
+  #:use-module (gnu packages chez))
+
+(define-public loko-scheme
+  (package
+    (name "loko-scheme")
+    (version "0.6.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://gitlab.com/weinholt/loko.git")
+               (commit (string-append "v" version))))
+        (sha256
+          (base32 "019jlh3lywy912cfz689c9fxgf4bi5700i9k04g7sl5w5gchj36m"))
+        (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; r7rs tests are still failing as of 0.6.0.
+       #:strip-binaries? #f
+       #:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list
+          (string-append "PREFIX=" out)
+          (string-append "GDB_AUTOLOAD_PATH=" out "/share/gdb/auto-load")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'akku-fixes
+           (lambda* (#:key inputs #:allow-other-keys)
+             (delete-file "Akku.lock")
+             (substitute* "Akku.manifest"
+               (("\\(depends.*") "(depends)"))
+             (invoke "akku" "install")
+             (let ((dest "./.akku/lib/")
+                   (source "/share/guile/site/3.0/"))
+               (for-each
+                (lambda (name)
+                  ;; Symlink the scheme libraries so that Akku can find them
+                  (symlink (string-append (assoc-ref inputs name) source name)
+                           (string-append dest name)))
+                '("struct", "laesare", "pfds", "machine-code")))
+             (substitute* ".akku/env"
+               (("/bin/sh") (which "sh")))
+             #t)))))
+    (native-inputs
+     `(("akku" ,akku)
+       ("chez-scheme" ,chez-scheme)
+       ("struct" ,guile-struct-pack)
+       ("laesare" ,guile-laesare)
+       ("pfds" ,guile-pfds)
+       ("machine-code" ,guile-machine-code)))
+    (home-page "https://scheme.fail")
+    (synopsis "Implementation of the algorithmic language Scheme")
+    (description
+     "Loko Scheme is intended to be a platform for application and operating
+system development.  It is written purely in Scheme and some assembler (i.e. no
+C code at the bottom).  Both the R6RS and the R7RS standards are supported.")
+    (license license:agpl3+)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library.
  2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 1/5] " Martin Becze
@ 2020-09-04 20:25   ` Martin Becze
  2020-09-07  6:30     ` Mathieu Othacehe
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack Martin Becze
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 20+ messages in thread
From: Martin Becze @ 2020-09-04 20:25 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

This allow the package to be resused by r6rs compliant scheme implementations
that expect *.sls files.

* gnu/packages/guile-xyz.scm (guile2.2-pfds): Rename *.sls files to *.scm
since Guile 2 does not support the sls extension.
(guile-pfds): Removed the renaming of files to *.sls to *.scm.
---
 gnu/packages/guile-xyz.scm | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index fa6855f43d..308ce0ad59 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -798,6 +798,7 @@ using Guile's foreign function interface.")
     (build-system guile-build-system)
     (arguments
      '(#:source-directory "src"
+       #:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
        #:phases (modify-phases %standard-phases
                   (add-after 'unpack 'move-files-around
                     (lambda _
@@ -806,8 +807,7 @@ using Guile's foreign function interface.")
                       (mkdir-p "src/pfds")
                       (for-each (lambda (file)
                                   (rename-file file
-                                               (string-append "src/pfds/"
-                                                              file)))
+                                    (string-append "src/pfds/" file)))
                                 '("bbtrees.sls"
                                   "deques"
                                   "deques.sls"
@@ -821,15 +821,6 @@ using Guile's foreign function interface.")
                                   "queues.sls"
                                   "sequences.sls"
                                   "sets.sls"))
-
-                      ;; In Guile <= 2.2.4, there's no way to tell 'guild
-                      ;; compile' to accept the ".sls" extension.  So...
-                      (for-each (lambda (file)
-                                  (rename-file file
-                                               (string-append
-                                                (string-drop-right file 4)
-                                                ".scm")))
-                                (find-files "." "\\.sls$"))
                       #t)))))
     (native-inputs
      `(("guile" ,guile-3.0)))
@@ -862,7 +853,18 @@ Vicare Scheme and IronScheme.  Right now it contains:
      (substitute-keyword-arguments (package-arguments guile-pfds)
        ((#:phases phases)
         `(modify-phases ,phases
-           (delete 'work-around-guile-bug)))))))
+           (delete 'work-around-guile-bug)
+           (add-after 'move-files-around 'sls->scm
+             (lambda _
+               ;; In Guile <= 2.2.4, there's no way to tell 'guild
+               ;; compile' to accept the ".sls" extension.  So...
+               (for-each (lambda (file)
+                           (rename-file file
+                                        (string-append
+                                         (string-drop-right file 4)
+                                         ".scm")))
+                         (find-files "." "\\.sls$"))
+               #t))))))))
 
 (define-public guile3.0-pfds
   (deprecated-package "guile3.0-pfds" guile-pfds))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack.
  2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 1/5] " Martin Becze
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library Martin Becze
@ 2020-09-04 20:25   ` Martin Becze
  2020-09-07  6:30     ` Mathieu Othacehe
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 4/5] gnu: Add guile-machine-code Martin Becze
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 5/5] gnu: Add guile-laesare Martin Becze
  4 siblings, 1 reply; 20+ messages in thread
From: Martin Becze @ 2020-09-04 20:25 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/guile-xyz.scm (guile-struct-pack): New variable.
---
 gnu/packages/guile-xyz.scm | 43 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 308ce0ad59..a2df03760d 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3846,3 +3846,46 @@ between data, in a way that is very similar to WikiData or RDF for instance.
 An object can have relations (in the form of an IRI) that relates it to one or
 more objects or strings, represented by a Json object or an IRI.")
     (license license:gpl3+)))
+
+(define-public guile-struct-pack
+  (package
+    (name "guile-struct-pack")
+    (version "1.1.1")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/weinholt/struct-pack.git")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0hd72m821pahjphzyjn26i55542v8makr55xzjll2cycja4wsbc1"))))
+    (build-system guile-build-system)
+    (arguments
+      `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+        #:modules ((guix build guile-build-system)
+                   (guix build utils)
+                   (ice-9 ftw))
+        #:phases (modify-phases %standard-phases
+                   (add-before 'build 'move-sls-files
+                     (lambda _
+                       ;; Move files under a struct/ directory to reflect the
+                       ;; module hierarchy.
+                       (define (mv dst)
+                         (define (target file)
+                           (string-append  dst "/" file))
+                         (define files (cddr (scandir ".")))
+                         (mkdir dst)
+                         (for-each (lambda (file)
+                                     (rename-file file (target file)))
+                                   files))
+                       (mv "struct")
+                       #t)))))
+    (native-inputs
+      `(("guile" ,guile-3.0)))
+    (home-page "https://gitlab.com/mjbecze/guile-srfi-89")
+    (synopsis "R6RS library for working with packed byte structures")
+    (description
+      "This is an R6RS library for working with packed byte structures.  It is
+similar to struct in Python or pack and unpack in Perl.")
+                                (license license:expat)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 4/5] gnu: Add guile-machine-code.
  2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
                     ` (2 preceding siblings ...)
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack Martin Becze
@ 2020-09-04 20:25   ` Martin Becze
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 5/5] gnu: Add guile-laesare Martin Becze
  4 siblings, 0 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-04 20:25 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/guile-xyz.scm (guile-machine-code): New variable.
---
 gnu/packages/guile-xyz.scm | 49 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index a2df03760d..a699377ff8 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3889,3 +3889,52 @@ more objects or strings, represented by a Json object or an IRI.")
       "This is an R6RS library for working with packed byte structures.  It is
 similar to struct in Python or pack and unpack in Perl.")
                                 (license license:expat)))
+
+(define-public guile-machine-code
+  (package
+    (name "guile-machine-code")
+    (version "2.1.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/weinholt/machine-code.git")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "0wzj3caj2jypzyjqfkfqkvr3kkbjabsnhldv9kvnx9w9qnria5yd"))))
+    (build-system guile-build-system)
+    (arguments
+     `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+       #:modules ((guix build guile-build-system)
+                  (guix build utils)
+                  (ice-9 ftw))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'move-sls-files
+                    (lambda _
+                      ;; Move files under a machine-code directory to reflect
+                      ;; the module hierarchy.
+                      (define (mv dst)
+                        (define (target file)
+                          (string-append  dst "/" file))
+                        (define files (cddr (scandir ".")))
+                        (mkdir dst)
+                        (for-each (lambda (file)
+                                    (rename-file file (target file)))
+                                  files))
+                      (mv "machine-code")
+                      #t)))))
+    (native-inputs
+     `(("guile" ,guile-3.0)))
+    (propagated-inputs
+     `(("guile-struct-pack" ,guile-struct-pack)))
+    (home-page "https://github.com/weinholt/machine-code")
+    (synopsis "Tools that relate to machine code and object formats")
+    (description
+     "This project is about the development of tools that relate to machine
+code and object formats; for all architectures.  Here you'll find libraries for
+working with binary code: assembly, disassembly, instruction tables, object
+formats and related areas.")
+    (license license:expat)))
+
+
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 5/5] gnu: Add guile-laesare.
  2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
                     ` (3 preceding siblings ...)
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 4/5] gnu: Add guile-machine-code Martin Becze
@ 2020-09-04 20:25   ` Martin Becze
  4 siblings, 0 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-04 20:25 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/guile-xyz.scm (guile-laesare): New variable.
---
 gnu/packages/guile-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index a699377ff8..ed4b445701 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3937,4 +3937,47 @@ working with binary code: assembly, disassembly, instruction tables, object
 formats and related areas.")
     (license license:expat)))
 
-
+(define-public guile-laesare
+  (package
+    (name "guile-laesare")
+    (version "1.0.0")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/weinholt/laesare.git")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32 "15q619gzw717r8r1ql23zfdaibpnp9qqs96032vdc3rj74msxc92"))))
+    (build-system guile-build-system)
+    (arguments
+     `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+       #:modules ((guix build guile-build-system)
+                  (guix build utils)
+                  (ice-9 ftw))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'move-sls-files
+                    (lambda _
+                      ;; Move files under a laesare directory to reflect
+                      ;; the module hierarchy.
+                      (define (mv dst)
+                        (define (target file)
+                          (string-append  dst "/" file))
+                        (define files (cddr (scandir ".")))
+                        (mkdir dst)
+                        (for-each (lambda (file)
+                                    (rename-file file (target file)))
+                                  files))
+                      (mv "laesare")
+                      #t)))))
+    (native-inputs
+     `(("guile" ,guile-3.0)))
+    (home-page "https://github.com/weinholt/laesare")
+    (synopsis "R6RS Scheme library that provides a reader")
+    (description
+     "This is an R6RS Scheme library that provides a reader with some extra
+features not found in the standard read procedure such as a compatible mode
+with support for other RnRS standards and a tolerant mode that continues on
+errors.")
+    (license license:expat)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack.
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack Martin Becze
@ 2020-09-07  6:30     ` Mathieu Othacehe
  2020-09-08 16:04       ` Martin Becze
  0 siblings, 1 reply; 20+ messages in thread
From: Mathieu Othacehe @ 2020-09-07  6:30 UTC (permalink / raw)
  To: Martin Becze; +Cc: 43183


Hey Martin,

Thanks for the v2!

> +                       (define (mv dst)

I'm not sure it's useful to define a procedure here, as it will only be
called once.

> +                         (define (target file)
> +                           (string-append  dst "/" file))
> +                         (define files (cddr (scandir ".")))

We try to avoid car, cdr & friends. You can use:

--8<---------------cut here---------------start------------->8---
(scandir dir (negate (cut member <> '("." ".."))))
--8<---------------cut here---------------end--------------->8---

instead.

> +    (description
> +      "This is an R6RS library for working with packed byte structures.  It is
> +similar to struct in Python or pack and unpack in Perl.")
> +                                (license license:expat)))

Make sure to use the correct indentation, using Emacs or indent-code.el
script.

Also, the order of the patchset is not correct. The patch adding
"loko-scheme" should be the last one, as it depends on the other ones,
and won't build without them.

Could you send an updated version :) ?

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library.
  2020-09-04 20:25   ` [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library Martin Becze
@ 2020-09-07  6:30     ` Mathieu Othacehe
  0 siblings, 0 replies; 20+ messages in thread
From: Mathieu Othacehe @ 2020-09-07  6:30 UTC (permalink / raw)
  To: Martin Becze; +Cc: 43183


> * gnu/packages/guile-xyz.scm (guile2.2-pfds): Rename *.sls files to *.scm
> since Guile 2 does not support the sls extension.
> (guile-pfds): Removed the renaming of files to *.sls to *.scm.

I applied this one that looks fine.

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v3 0/4] Add loko-scheme.
  2020-09-03 15:02 [bug#43183] [PATCH] gnu: Add loko-scheme Martin Becze
  2020-09-04  6:43 ` Mathieu Othacehe
  2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
@ 2020-09-08 15:59 ` Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 1/4] gnu: Add guile-struct-pack Martin Becze
                     ` (3 more replies)
  2 siblings, 4 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-08 15:59 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

This add loko-scheme.

Martin Becze (4):
  gnu: Add guile-struct-pack.
  gnu: Add guile-machine-code.
  gnu: Add guile-laesare.
  gnu: Add loko-scheme.

 gnu/local.mk               |   2 +
 gnu/packages/guile-xyz.scm | 138 +++++++++++++++++++++++++++++++++++++
 gnu/packages/loko.scm      |  85 +++++++++++++++++++++++
 3 files changed, 225 insertions(+)
 create mode 100644 gnu/packages/loko.scm

-- 
2.28.0





^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v3 1/4] gnu: Add guile-struct-pack.
  2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
@ 2020-09-08 15:59   ` Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 2/4] gnu: Add guile-machine-code Martin Becze
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-08 15:59 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/guile-xyz.scm (guile-struct-pack): New variable.
---
 gnu/packages/guile-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 80f792672c..e1c763faef 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3867,3 +3867,47 @@ between data, in a way that is very similar to WikiData or RDF for instance.
 An object can have relations (in the form of an IRI) that relates it to one or
 more objects or strings, represented by a Json object or an IRI.")
     (license license:gpl3+)))
+
+(define-public guile-struct-pack
+  (package
+    (name "guile-struct-pack")
+    (version "1.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/weinholt/struct-pack.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0hd72m821pahjphzyjn26i55542v8makr55xzjll2cycja4wsbc1"))))
+    (build-system guile-build-system)
+    (arguments
+     `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+       #:modules ((guix build guile-build-system)
+                  (guix build utils)
+                  (srfi srfi-26)
+                  (ice-9 ftw))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'move-sls-files
+                    (lambda _
+                      ;; Move files under a struct/ directory to reflect the
+                      ;; module hierarchy.
+                      (define dst-folder "struct")
+                      (define (target file)
+                        (string-append dst-folder "/" file))
+                      (define files
+                        (scandir "." (negate (cut member <> '("." "..")))))
+                      (mkdir dst-folder)
+                      (for-each (lambda (file)
+                                  (rename-file file (target file)))
+                                files)
+                      #t)))))
+    (native-inputs
+     `(("guile" ,guile-3.0)))
+    (home-page "https://github.com/weinholt/struct-pack")
+    (synopsis "R6RS library for working with packed byte structures")
+    (description
+     "This is an R6RS library for working with packed byte structures.  It is
+similar to struct in Python or pack and unpack in Perl.")
+    (license license:expat)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v3 2/4] gnu: Add guile-machine-code.
  2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 1/4] gnu: Add guile-struct-pack Martin Becze
@ 2020-09-08 15:59   ` Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 3/4] gnu: Add guile-laesare Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 4/4] gnu: Add loko-scheme Martin Becze
  3 siblings, 0 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-08 15:59 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/guile-xyz.scm (guile-machine-code): New variable.
---
 gnu/packages/guile-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index e1c763faef..7c8a417a14 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3911,3 +3911,51 @@ more objects or strings, represented by a Json object or an IRI.")
      "This is an R6RS library for working with packed byte structures.  It is
 similar to struct in Python or pack and unpack in Perl.")
     (license license:expat)))
+
+(define-public guile-machine-code
+  (package
+    (name "guile-machine-code")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/weinholt/machine-code.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0wzj3caj2jypzyjqfkfqkvr3kkbjabsnhldv9kvnx9w9qnria5yd"))))
+    (build-system guile-build-system)
+    (arguments
+     `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+       #:modules ((guix build guile-build-system)
+                  (guix build utils)
+                  (srfi srfi-26)
+                  (ice-9 ftw))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'move-sls-files
+                    (lambda _
+                      ;; Move files under a struct/ directory to reflect the
+                      ;; module hierarchy.
+                      (define dst-folder "machine-code")
+                      (define (target file)
+                        (string-append dst-folder "/" file))
+                      (define files
+                        (scandir "." (negate (cut member <> '("." "..")))))
+                      (mkdir dst-folder)
+                      (for-each (lambda (file)
+                                  (rename-file file (target file)))
+                                files)
+                      #t)))))
+    (native-inputs
+     `(("guile" ,guile-3.0)))
+    (propagated-inputs
+     `(("guile-struct-pack" ,guile-struct-pack)))
+    (home-page "https://github.com/weinholt/machine-code")
+    (synopsis "Tools that relate to machine code and object formats")
+    (description
+     "This project is about the development of tools that relate to machine
+code and object formats; for all architectures.  Here you'll find libraries for
+working with binary code: assembly, disassembly, instruction tables, object
+formats and related areas.")
+    (license license:expat)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v3 3/4] gnu: Add guile-laesare.
  2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 1/4] gnu: Add guile-struct-pack Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 2/4] gnu: Add guile-machine-code Martin Becze
@ 2020-09-08 15:59   ` Martin Becze
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 4/4] gnu: Add loko-scheme Martin Becze
  3 siblings, 0 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-08 15:59 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/guile-xyz.scm (guile-laesare): New variable.
---
 gnu/packages/guile-xyz.scm | 46 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 7c8a417a14..bba60361d0 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3959,3 +3959,49 @@ code and object formats; for all architectures.  Here you'll find libraries for
 working with binary code: assembly, disassembly, instruction tables, object
 formats and related areas.")
     (license license:expat)))
+
+(define-public guile-laesare
+  (package
+    (name "guile-laesare")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/weinholt/laesare.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "15q619gzw717r8r1ql23zfdaibpnp9qqs96032vdc3rj74msxc92"))))
+    (build-system guile-build-system)
+    (arguments
+     `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+       #:modules ((guix build guile-build-system)
+                  (guix build utils)
+                  (srfi srfi-26)
+                  (ice-9 ftw))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'move-sls-files
+                    (lambda _
+                      ;; Move files under a laesare directory to reflect
+                      ;; the module hierarchy.
+                      (define dst-folder "laesare")
+                      (define (target file)
+                        (string-append dst-folder "/" file))
+                      (define files
+                        (scandir "." (negate (cut member <> '("." "..")))))
+                      (mkdir dst-folder)
+                      (for-each (lambda (file)
+                                  (rename-file file (target file)))
+                                files)
+                      #t)))))
+    (native-inputs
+     `(("guile" ,guile-3.0)))
+    (home-page "https://github.com/weinholt/laesare")
+    (synopsis "R6RS Scheme library that provides a reader")
+    (description
+     "This is an R6RS Scheme library that provides a reader with some extra
+features not found in the standard read procedure such as a compatible mode
+with support for other RnRS standards and a tolerant mode that continues on
+errors.")
+    (license license:expat)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v3 4/4] gnu: Add loko-scheme.
  2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
                     ` (2 preceding siblings ...)
  2020-09-08 15:59   ` [bug#43183] [PATCH v3 3/4] gnu: Add guile-laesare Martin Becze
@ 2020-09-08 15:59   ` Martin Becze
  3 siblings, 0 replies; 20+ messages in thread
From: Martin Becze @ 2020-09-08 15:59 UTC (permalink / raw)
  To: 43183; +Cc: Martin Becze

* gnu/packages/loko.scm (loko-scheme): New variable.
---
 gnu/local.mk          |  2 +
 gnu/packages/loko.scm | 85 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 gnu/packages/loko.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index dd15126b26..10f8ee5b9a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -36,6 +36,7 @@
 # Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 # Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
 # Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
+# Copyright © 2020 Martin Becze <mjbecze@riseup.net>
 #
 # This file is part of GNU Guix.
 #
@@ -342,6 +343,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/lout.scm				\
   %D%/packages/logging.scm			\
   %D%/packages/logo.scm				\
+  %D%/packages/loko.scm				\
   %D%/packages/lolcode.scm                      \
   %D%/packages/lsof.scm				\
   %D%/packages/lua.scm				\
diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm
new file mode 100644
index 0000000000..1f216d27f9
--- /dev/null
+++ b/gnu/packages/loko.scm
@@ -0,0 +1,85 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages loko)
+  #:use-module (guix packages)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages package-management)
+  #:use-module (gnu packages guile)
+  #:use-module (gnu packages guile-xyz)
+  #:use-module (gnu packages chez))
+
+(define-public loko-scheme
+  (package
+    (name "loko-scheme")
+    (version "0.6.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/weinholt/loko.git")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "019jlh3lywy912cfz689c9fxgf4bi5700i9k04g7sl5w5gchj36m"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; r7rs tests are still failing as of 0.6.0.
+       #:tests? #f
+       #:strip-binaries? #f
+       #:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         (list
+          (string-append "PREFIX=" out)
+          (string-append "GDB_AUTOLOAD_PATH=" out "/share/gdb/auto-load")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'akku-fixes
+           (lambda* (#:key inputs #:allow-other-keys)
+             (delete-file "Akku.lock")
+             (substitute* "Akku.manifest"
+               (("\\(depends.*") "(depends)"))
+             (invoke "akku" "install")
+             (let ((dest "./.akku/lib/")
+                   (source "/share/guile/site/3.0/"))
+               (for-each
+                (lambda (name)
+                  ;; Symlink the scheme libraries so that Akku can find them
+                  (symlink (string-append (assoc-ref inputs name) source name)
+                           (string-append dest name)))
+                '("struct" ,"laesare" ,"pfds" ,"machine-code")))
+             (substitute* ".akku/env"
+               (("/bin/sh") (which "sh")))
+             #t)))))
+    (native-inputs
+     `(("akku" ,akku)
+       ("chez-scheme" ,chez-scheme)
+       ("struct" ,guile-struct-pack)
+       ("laesare" ,guile-laesare)
+       ("pfds" ,guile-pfds)
+       ("machine-code" ,guile-machine-code)))
+    (home-page "https://scheme.fail")
+    (synopsis "Implementation of the algorithmic language Scheme")
+    (description
+     "Loko Scheme is intended to be a platform for application and operating
+system development.  It is written purely in Scheme and some assembler (i.e. no
+C code at the bottom).  Both the R6RS and the R7RS standards are supported.")
+    (license license:agpl3+)))
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack.
  2020-09-07  6:30     ` Mathieu Othacehe
@ 2020-09-08 16:04       ` Martin Becze
  2020-09-10  7:37         ` bug#43183: " Mathieu Othacehe
  0 siblings, 1 reply; 20+ messages in thread
From: Martin Becze @ 2020-09-08 16:04 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 43183


[-- Attachment #1.1: Type: text/plain, Size: 348 bytes --]

Thanks for the feedback Mathieu!

On 9/7/20 1:30 AM, Mathieu Othacehe wrote:
> Make sure to use the correct indentation, using Emacs or indent-code.el
> script.

I apologize, I'm having a bit of difficultly with Emacs atm.

> Could you send an updated version :) ?

I just sent V3, hopefull with all the feedback correctly integrated.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* bug#43183: [PATCH v2 3/5] gnu: Add guile-struct-pack.
  2020-09-08 16:04       ` Martin Becze
@ 2020-09-10  7:37         ` Mathieu Othacehe
  0 siblings, 0 replies; 20+ messages in thread
From: Mathieu Othacehe @ 2020-09-10  7:37 UTC (permalink / raw)
  To: Martin Becze; +Cc: 43183-done


Hello Martin,

> I apologize, I'm having a bit of difficultly with Emacs atm.

No worries! I fixed minor details and pushed.

Thanks,

-- 
Mathieu
https://othacehe.org




^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-09-10  7:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-03 15:02 [bug#43183] [PATCH] gnu: Add loko-scheme Martin Becze
2020-09-04  6:43 ` Mathieu Othacehe
2020-09-04  6:49   ` Martin Becze
2020-09-04  7:16     ` Mathieu Othacehe
2020-09-04  7:33       ` Ricardo Wurmus
2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 1/5] " Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library Martin Becze
2020-09-07  6:30     ` Mathieu Othacehe
2020-09-04 20:25   ` [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack Martin Becze
2020-09-07  6:30     ` Mathieu Othacehe
2020-09-08 16:04       ` Martin Becze
2020-09-10  7:37         ` bug#43183: " Mathieu Othacehe
2020-09-04 20:25   ` [bug#43183] [PATCH v2 4/5] gnu: Add guile-machine-code Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 5/5] gnu: Add guile-laesare Martin Becze
2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 1/4] gnu: Add guile-struct-pack Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 2/4] gnu: Add guile-machine-code Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 3/4] gnu: Add guile-laesare Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 4/4] gnu: Add loko-scheme Martin Becze

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).