From 0162b638d42d02b4ed11db77b2ad46179f673f03 Mon Sep 17 00:00:00 2001
From: Joeke de Graaf <joeke@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(+)
@@ -21,6 +21,7 @@
;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
;;; Copyright © 2021 Charles Jackson <charles.b.jackson@protonmail.com>
;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2022 Joeke de Graaf <joeke@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