summaryrefslogtreecommitdiff
path: root/gnu/packages/guile-xyz.scm
diff options
context:
space:
mode:
authorNoƩ Lopez <noelopez@free.fr>2025-06-18 19:46:57 +0200
committerjgart <jgart@dismail.de>2025-06-19 00:17:31 -0400
commit0cc0a9d4145174102469f5ebf769e587464892dd (patch)
tree2b189a2665001e9ab6e4e36286012742cdfeb336 /gnu/packages/guile-xyz.scm
parent3332fe04bb38b66fe91e4eace6a821b74d6c870b (diff)
gnu: guile-custom-ports: Use absolute file name for loading extension.
* gnu/packages/guile-xyz.scm (guile-custom-ports): Set extension path to absolute path and install extension before building Guile modules. Change-Id: I93d4fa8b6118a4d97c5fc199a4a0055de4e2c255
Diffstat (limited to 'gnu/packages/guile-xyz.scm')
-rw-r--r--gnu/packages/guile-xyz.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 38f9e8ffce..0cb3bd1592 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1358,6 +1358,20 @@ order to provide IDE functionality for Guile Scheme.")
#:source #$(this-package-input "guile-sources"))
(chdir "..")
(rename-file "guile-3.0.9" "guile-sources")))
+ (add-after 'unpack 'set-extension-path
+ (lambda _
+ (substitute* "module/ice-9/custom-ports.scm"
+ (("\\(load-extension.*")
+ (string-append "(load-extension \"" #$output
+ "/lib/libguile-custom-ports-3.0.so\"\n")))))
+ ;; We need to install the extension before building the Guile modules
+ ;; so that it is found at build time. This can be removed once our
+ ;; guile package has the native-search-path for GUILE_EXTENSIONS_PATH.
+ (add-after 'configure 'build-and-install-extension
+ (lambda _
+ (invoke "meson" "compile" "guile-custom-ports-3.0")
+ (install-file "src/libguile-custom-ports-3.0.so"
+ (string-append #$output "/lib"))))
(delete 'shrink-runpath))))
(home-page "https://codeberg.org/Baleine/guile-custom-ports")
(synopsis "Standalone custom ports for Guile before 3.10")