[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: gnu: Add s7.
From: |
guix-commits |
Subject: |
03/03: gnu: Add s7. |
Date: |
Sat, 3 Jun 2023 04:41:14 -0400 (EDT) |
iyzsong pushed a commit to branch master
in repository guix.
commit 76b7c50645cfba9554af9c80768765c5b714b893
Author: Antero Mejr <antero@mailbox.org>
AuthorDate: Tue Apr 25 02:06:53 2023 +0000
gnu: Add s7.
* gnu/packages/lisp.scm (s7): New variable.
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
---
gnu/packages/lisp.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 5ac378d06d..c053da9cd5 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -1578,3 +1578,32 @@ that may be copied into the source tree of another
application. There are no
libraries, no run-time init files, and no configuration scripts. It can also
be built as a stand-alone REPL interpreter.")
(license license:bsd-0)))))
+
+(define-public s7
+ (package
+ (inherit s7-bootstrap)
+ (name "s7")
+ (arguments
+ (substitute-keyword-arguments (package-arguments s7-bootstrap)
+ ((#:tests? _) #t)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'patch
+ (lambda _
+ (substitute* "s7.c"
+ (("libc_s7.so")
+ (string-append #$output "/lib/libc_s7.so")))))
+ (add-after 'build 'build-full
+ (lambda _
+ (invoke "repl" "./libc.scm")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "repl" "./s7test.scm"))))
+ (add-after 'install 'install-full
+ (lambda _
+ (install-file "libc_s7.so"
+ (string-append #$output "/lib/"))
+ (delete-file (string-append #$output "/bin/ffitest"))))))))
+ (native-inputs (list s7-bootstrap))
+ (properties (alist-delete 'hidden? (package-properties s7-bootstrap)))))