gnu: Add s7.

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

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
This commit is contained in:
Antero Mejr 2023-04-25 02:06:53 +00:00 committed by 宋文武
parent 1569f7d77e
commit 76b7c50645
No known key found for this signature in database
GPG key ID: D415BF253B515976

View file

@ -1578,3 +1578,32 @@ (define-public s7-bootstrap
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)))))