Subject: [bug#77682] [PATCH 1/2] gnu: liblouis: Fix library path for python extension.

From: Noé Lopez <[email-masked]>
Date: Wed, 9 Apr 2025 23:49:42 +0200

This changes the extension to load the library from its absolute path instead
of just with its name, which wouldn’t work.

Fixes <https://issues.guix.gnu.org/77669>.

* gnu/packages/language.scm (liblouis): Add fix-python-lib-path phase.

Change-Id: Icdd476eed5a77ddb93c437ec4d92c79bf2db7bce
---
 gnu/packages/language.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index a6011bfce2..13957e12a0 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -351,6 +351,12 @@ (define-public liblouis
       #:configure-flags #~(list "--disable-static" "--enable-ucs4")
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-python-lib-path
+            (lambda _
+              (with-directory-excursion "python"
+                (substitute* "louis/__init__.py.in"
+                  (("###LIBLOUIS_SONAME###")
+                   (string-append #$output "/lib/###LIBLOUIS_SONAME###"))))))
           (add-after 'install 'install-python-extension
             (lambda _
               (with-directory-excursion "python"
-- 
2.49.0