diff --git a/steps-guix/guix-1.5.0/pass1.sh b/steps-guix/guix-1.5.0/pass1.sh index f2517de2..1fb19cfc 100755 --- a/steps-guix/guix-1.5.0/pass1.sh +++ b/steps-guix/guix-1.5.0/pass1.sh @@ -175,10 +175,10 @@ src_configure() { argp_ldflags="-L${KERNEL_SYSROOT}/lib" guile_cflags="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ /usr/bin/pkg-config --cflags guile-3.0)" - # Guix daemon links Guile statically in this environment; use --static so - # private deps (e.g. libunistring for uc_* symbols) are included. + # Guix runtime loads Guile extensions such as guile-gnutls dynamically. + # Link against the shared libguile so those extensions reuse one runtime. guile_libs="$(PKG_CONFIG_LIBDIR="${pkg_config_path}" PKG_CONFIG_PATH="${pkg_config_path}" \ - /usr/bin/pkg-config --static --libs guile-3.0)" + /usr/bin/pkg-config --libs guile-3.0)" probe_guile_module gnutls probe_guile_module git diff --git a/steps-guix/improve/guix-daemon-and-pull.sh b/steps-guix/improve/guix-daemon-and-pull.sh index 2d13e187..52bd1406 100644 --- a/steps-guix/improve/guix-daemon-and-pull.sh +++ b/steps-guix/improve/guix-daemon-and-pull.sh @@ -17,6 +17,20 @@ guix_seed_helper="/steps-guix/improve/guix-1.5.0.sh" guix_patch_dir="/steps-guix/guix-1.5.0/patches" PATH="/usr/sbin:/sbin:${PATH}" export GUIX_DAEMON_SOCKET="${daemon_socket}" +guile_site_path="${PREFIX}/share/guile/site/3.0:${PREFIX}/share/guile/3.0" +guile_site_ccache="${LIBDIR}/guile/3.0/site-ccache" +guile_core_ccache="${LIBDIR}/guile/3.0/ccache" +guile_ext_path="${LIBDIR}/guile/3.0/extensions" + +# Keep Guile runtime lookup deterministic for both CLI and daemon-side Guile +# helpers. +export LD_LIBRARY_PATH="${LIBDIR}:${PREFIX}/lib:${LD_LIBRARY_PATH}" +export GUILE_LOAD_PATH="${guile_site_path}" +export GUILE_LOAD_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" +export GUILE_SYSTEM_PATH="${guile_site_path}" +export GUILE_SYSTEM_COMPILED_PATH="${guile_site_ccache}:${guile_core_ccache}" +export GUILE_EXTENSIONS_PATH="${guile_ext_path}" +export GNUTLS_GUILE_EXTENSION_DIR="${guile_ext_path}" have_group() { if command -v getent >/dev/null 2>&1; then