all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Konrad Hinsen <konrad.hinsen@fastmail.net>
To: 73057@debbugs.gnu.org
Subject: [bug#73057] [PATCH 2/2] gnu: Add sbcl-ciel-repl.
Date: Thu, 05 Sep 2024 21:43:43 +0200	[thread overview]
Message-ID: <m1ed5xga34.fsf@fastmail.net> (raw)

* gnu/packages/lisp-xyz.scm (sbcl-ciel-repl): New variable.

Change-Id: I85eabe27d35a6d540a634f4121209b59a6c7085b
---
 gnu/packages/lisp-xyz.scm | 69 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index c22d5f6565..536b4029dc 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -3563,6 +3563,75 @@ (define-public cl-ciel
 (define-public ecl-ciel
   (sbcl-package->ecl-package sbcl-ciel))
 
+(define-public sbcl-ciel-repl
+  (let ((commit "0b26d64dcd91a3a2aa962842629a853261dd30fe")
+        (version "0.2.1"))
+    (package
+      (name "sbcl-ciel-repl")
+      (version version)
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/khinsen/CIEL")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0gm8slnz4jw98rkijnh2dp6x629xdnfk8z7j35g03j6ypr56v06h"))
+         (patches (search-patches "ciel-repl.patch"))))
+      (build-system asdf-build-system/sbcl)
+      (inputs
+       (list sbcl-ciel
+             sbcl-cl-readline
+             sbcl-lisp-critic
+             sbcl-magic-ed))
+      (arguments
+       (list
+        #:asd-systems ''("ciel/repl")
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; The built-in scripts require special care. They are
+            ;; read from src/scripts in the current directory.
+            ;; When the binary is built, the current directory is
+            ;; {out}/bin, so the scripts have to be copied there,
+            ;; but that copy must be deleted after the binary has been
+            ;; built, otherwise it would end up in the package.
+            (add-after 'create-asdf-configuration 'install-scripts
+              (lambda _
+                (let ((dir (string-append #$output "/bin/src/scripts")))
+                  (for-each (lambda (file)
+                              (install-file file dir))
+                            (find-files "src/scripts" "\\.lisp$")))))
+            (add-after 'install-scripts 'build-program
+              (lambda* (#:key outputs #:allow-other-keys)
+                (build-program
+                 (string-append #$output "/bin/ciel")
+                 outputs
+                 #:entry-program '((ciel::main))
+                 #:dependencies '("ciel/repl")
+                 #:compress? #t)))
+            (add-after 'build-program 'delete-scripts
+              (lambda _
+                (let ((dir (string-append #$output "/bin/src")))
+                  (delete-file-recursively dir))))
+            ;; Remove everything except the binary.
+            (add-after 'delete-scripts 'delete-lisp-files
+              (lambda _
+                (let ((dir (string-append #$output "/etc")))
+                  (delete-file-recursively dir))
+                (let ((dir (string-append #$output "/lib")))
+                  (delete-file-recursively dir))
+                (let ((dir (string-append #$output "/share")))
+                  (delete-file-recursively dir))
+                (let ((dir (string-append #$output "/.asd-files")))
+                  (delete-file-recursively dir)))))))
+      (home-page "http://ciel-lang.org/")
+      (synopsis "Terminal REPL for CIEL")
+      (description
+       "CIEL as a precompiled binary and a full-featured REPL
+for the terminal.")
+      (license license:expat))))
+
 (define-public sbcl-circular-streams
   (let ((commit "e770bade1919c5e8533dd2078c93c3d3bbeb38df")
         (revision "1"))
-- 
2.45.2




             reply	other threads:[~2024-09-05 20:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 19:43 Konrad Hinsen [this message]
2024-09-06  9:25 ` [bug#73057] [PATCH 2/2] gnu: Add sbcl-ciel-repl Guillaume Le Vaillant
2024-09-06 12:26   ` Konrad Hinsen
2024-09-06 12:27   ` Konrad Hinsen
2024-09-07 11:35     ` bug#73057: " Guillaume Le Vaillant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1ed5xga34.fsf@fastmail.net \
    --to=konrad.hinsen@fastmail.net \
    --cc=73057@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.