-
-
Save fstamour/c2cd15bc4bd286cc398c8f160e8b455d to your computer and use it in GitHub Desktop.
dump sbcl core with quicklisp (and some packages) preloaded (this is created before I use roswell)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
OUTPUT="sbql" | |
PRELOADS="alexandria cl-ppcre local-time cffi cl-interpol" | |
PREUSES="split-sequence anaphora iterate" | |
# sbcl --script <<EOF | |
sbcl --no-sysinit --no-userinit --noprint <<EOF | |
;; load quicklisp (from .sbclrc content added when quicklisp installation) | |
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" | |
(user-homedir-pathname)))) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init))) | |
(ql:quickload :cffi :silent t) | |
#+darwin(pushnew #P"/opt/local/lib/" cffi:*foreign-library-directories* :test #'equal) | |
#+darwin(pushnew #P"/opt/local/Library/Frameworks/" cffi:*darwin-framework-directories* :test #'equal) | |
;; load systems in PRELOADS | |
(let ((systems '($PRELOADS $PREUSES)) | |
(uses '($PREUSES))) | |
(dolist (s systems) (unintern s)) ; unintern symbols to avoid collision | |
(when systems | |
(ql:quickload systems :silent t)) | |
(dolist (u uses) | |
(use-package u))) | |
;; make SBCL_HOME environment variable is set at start up. | |
;; it isn't set for :EXECUTABLE T embedded core, but I need it to be set | |
;; for requiring contrib module: (require 'sb-cltl2) or so. | |
(push (lambda () | |
(cl-interpol:enable-interpol-syntax) | |
(sb-posix:putenv (concatenate 'string "SBCL_HOME=" #.(sb-posix:getenv "SBCL_HOME")))) | |
sb-ext:*init-hooks*) | |
;; make executable as specified name | |
(sb-ext:save-lisp-and-die "$OUTPUT" :purify t :executable t :compression t) | |
EOF | |
#| Local Variables: |# | |
#| mode:lisp |# | |
#| End: |#6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment