Subject: [bug#75317] [PATCH 1/6] gnu: gnucash: Fix locating perl binary.

From: Tomas Volf <[email-masked]>
Date: Fri, 3 Jan 2025 15:24:26 +0100

It tried to search in the $PATH, that does not really work for Guix.

* gnu/packages/gnucash.scm (gnucash)[arguments]<#:phases>: Add set-perl-path.

Change-Id: I93468c201de8af3ad76cce945483b76f28ea2749
---
 gnu/packages/gnucash.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gnu/packages/gnucash.scm b/gnu/packages/gnucash.scm
index 71a49b75d6..6df2b76505 100644
--- a/gnu/packages/gnucash.scm
+++ b/gnu/packages/gnucash.scm
@@ -102,6 +102,11 @@ (define-public gnucash
               (substitute* "CMakeLists.txt"
                 (("set\\(SHELL /bin/bash\\)")
                  (string-append "set(SHELL " (which "bash") ")")))))
+          (add-after 'unpack 'set-perl-path
+            (lambda _
+              (substitute* "libgnucash/app-utils/gnc-quotes.cpp"
+                (("c_cmd\\{bp::search_path\\(\"perl\"\\)\\}")
+                 (format #f "c_cmd{~s}" #$(file-append perl "/bin/perl"))))))
           ;; The qof test requires the en_US, en_GB, and fr_FR locales.
           (add-before 'check 'install-locales
             (lambda _
-- 
2.46.0