summary refs log tree commit diff
path: root/gnu/packages/guile-xyz.scm
diff options
context:
space:
mode:
authorMartin Becze <mjbecze@riseup.net>2020-09-08 10:59:45 -0500
committerMathieu Othacehe <othacehe@gnu.org>2020-09-10 09:26:43 +0200
commit3826288f68582deeb33cbe736a5e8a5e9c83c87e (patch)
treee0df1172dd70f97ca0f5b0aabe9fe4c7671ecc7f /gnu/packages/guile-xyz.scm
parent199da208eddc19a93e50e193f286875010aa77cf (diff)
downloadguix-3826288f68582deeb33cbe736a5e8a5e9c83c87e.tar.gz
gnu: Add guile-laesare.
* gnu/packages/guile-xyz.scm (guile-laesare): New variable.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu/packages/guile-xyz.scm')
-rw-r--r--gnu/packages/guile-xyz.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index fc164d7127..3090c6078b 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")
+             (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)))