diff options
| author | EuAndreh <eu@euandre.org> | 2026-07-03 14:47:03 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2026-07-03 14:47:03 -0300 |
| commit | 1b3fee48d4c16b3cb1ed22040efaf1d3af7c984b (patch) | |
| tree | 85b61e1bf283e3ef392318141d3288a176995af1 /etc/guix/home.scm | |
| parent | bin/vcs: Add origin detection for git_ps1() (diff) | |
| download | dotfiles-1b3fee48d4c16b3cb1ed22040efaf1d3af7c984b.tar.gz dotfiles-1b3fee48d4c16b3cb1ed22040efaf1d3af7c984b.tar.xz | |
etc/guix/home.scm: Add postgresql package
Its static libpq (libpq.a + libpgcommon_shlib.a + libpgport_shlib.a)
lets sumauma link its PostgreSQL backend.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lj1GkEuQUPFPEGLsnAp2x1
Diffstat (limited to '')
| -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") |
