diff options
| -rw-r--r-- | etc/guix/home.scm | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/etc/guix/home.scm b/etc/guix/home.scm index 9089959e..51746b24 100644 --- a/etc/guix/home.scm +++ b/etc/guix/home.scm @@ -167,6 +167,35 @@ POSIX standard archiver, which also provides @command{cpio} and @command{tar} interfaces.") (license licenses:bsd-3))) +(define sbcl-linkable + ;; Stock sbcl, additionally shipping the static runtime archive + ;; (libsbcl.a) and a USE_LIBSBCL line in sbcl.mk, so cffi-toolchain's + ;; static-program-op can statically link foreign libraries (e.g. + ;; capimbs's libcapim.a) into an SBCL image. Upstream ships only + ;; libsbcl.so. + (let ((pkg (specification->package "sbcl"))) + (package + (inherit pkg) + (name "sbcl-linkable") + (arguments + (substitute-keyword-arguments (package-arguments pkg) + ((#:phases phases) + `(modify-phases ,phases + ;; make.sh already built the runtime objects (incl. tlsf.o); + ;; the runtime GNUmakefile ars them into libsbcl.a. + (add-after 'build 'build-libsbcl.a + (lambda _ + (invoke "make" "-C" "src/runtime" "libsbcl.a"))) + (add-after 'install-shared-library 'install-libsbcl.a + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (home (string-append out "/lib/sbcl"))) + (install-file "src/runtime/libsbcl.a" home) + (let ((port (open-file + (string-append home "/sbcl.mk") "a"))) + (format port "USE_LIBSBCL=~a/libsbcl.a~%" home) + (close-port port)))))))))))) + (home-environment (packages (append @@ -473,7 +502,7 @@ POSIX standard archiver, which also provides @command{cpio} and gcc-toolchain:out gcc-toolchain:debug gcc-toolchain:static - ; musl + musl cppcheck clang tcc @@ -488,7 +517,6 @@ POSIX standard archiver, which also provides @command{cpio} and sdkmanager adb - sbcl gcl ecl clisp @@ -576,7 +604,9 @@ POSIX standard archiver, which also provides @command{cpio} and '((with-latest . "yt-dlp"))) yt-dlp) libuv-static - pax) + (specification->package "postgresql@14") + pax + sbcl-linkable) (list (script "cronjob" (slurp (string-append (getenv "HOME") |
