mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
gnu: Add sbcl-ciel-repl.
* gnu/packages/patches/sbcl-clei-repl.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/lisp-xyz.scm (sbcl-ciel-repl): New variable. Change-Id: I85eabe27d35a6d540a634f4121209b59a6c7085b Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
This commit is contained in:
parent
904f871378
commit
683cbb283a
3 changed files with 101 additions and 0 deletions
|
@ -2124,6 +2124,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/sbcl-aserve-add-HTML-5-elements.patch \
|
||||
%D%/packages/patches/sbcl-aserve-fix-rfe12668.patch \
|
||||
%D%/packages/patches/sbcl-burgled-batteries3-fix-signals.patch \
|
||||
%D%/packages/patches/sbcl-ciel-repl.patch \
|
||||
%D%/packages/patches/sbcl-clml-fix-types.patch \
|
||||
%D%/packages/patches/sbcl-eazy-gnuplot-skip-path-check.patch \
|
||||
%D%/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch \
|
||||
|
|
|
@ -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")
|
||||
(revision "0"))
|
||||
(package
|
||||
(name "sbcl-ciel-repl")
|
||||
(version (git-version "0.2.1" revision commit))
|
||||
(source
|
||||
(origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://github.com/ciel-lang/CIEL")
|
||||
(commit commit)))
|
||||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32 "0gm8slnz4jw98rkijnh2dp6x629xdnfk8z7j35g03j6ypr56v06h"))
|
||||
(patches (search-patches "sbcl-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
|
||||
"This package provides 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"))
|
||||
|
|
31
gnu/packages/patches/sbcl-ciel-repl.patch
Normal file
31
gnu/packages/patches/sbcl-ciel-repl.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
The standard CIEL REPL includes Quicklisp. We remove it for packaging
|
||||
with Guix.
|
||||
|
||||
The default Quicklisp-based build procedure removes one dependency
|
||||
relation from the system definition for ciel/repl and replaces it by
|
||||
an explicit load command using Quicklisp, as a workaround to some build
|
||||
issue. Fortunately we don't have this issue with Guix, so we go back
|
||||
to letting ASDF manage this dependency relation.
|
||||
|
||||
--- a/repl.lisp
|
||||
+++ b/repl.lisp
|
||||
@@ -1,8 +1,5 @@
|
||||
;; #!/usr/bin/sbcl --script
|
||||
-(load "~/quicklisp/setup")
|
||||
|
||||
-(let ((*standard-output* (make-broadcast-stream)))
|
||||
- (ql:quickload "cl-readline"))
|
||||
(uiop:define-package :sbcli
|
||||
(:use :common-lisp :trivial-package-local-nicknames)
|
||||
(:import-from :magic-ed
|
||||
--- a/ciel.asd
|
||||
+++ b/ciel.asd
|
||||
@@ -179,7 +179,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(asdf:defsystem "ciel/repl"
|
||||
:description "readline REPL for CIEL with quality of life improvements."
|
||||
- :depends-on (;; :ciel ;; let's avoid, it could run side effects twice (like a defparameter set then reset).
|
||||
+ :depends-on (:ciel
|
||||
;; deps
|
||||
:cl-readline
|
||||
:lisp-critic ;; it would be nice to integrate it with Slime.
|
Loading…
Reference in a new issue