Subject: Re: ibus-speech-to-text engine fails to run (?)

From: Luis Felipe <[email-masked]>
Date: Tue, 07 Feb 2023 16:41:41 +0000

Hi,

The attached patch fixed the issue for me. Now ibus-engine-stt seems to be running correctly and I can switch to the input method without the workaround indicated in the initial report.

I noticed that there are some lint issues from the original package definition though. I didn't fixed those:

$ ./pre-inst-env guix lint ibus-speech-to-text
/home/yo/guix/gnu/packages/ibus.scm:899:5: [email-masked]: 

[1] 'desktop-file-utils' should probably be a native input

/home/yo/guix/gnu/packages/ibus.scm:899:5: [email-masked]: 

[2] 'glib:bin' should probably be a native input

/home/yo/guix/gnu/packages/ibus.scm:899:5: [email-masked]: 

[3] 'gobject-introspection' should probably be a native input

/home/yo/guix/gnu/packages/ibus.scm:899:5: [email-masked]: 

[4] label 'glib' does not match package name 'glib:bin'

/home/yo/guix/gnu/packages/ibus.scm:856:2: [email-masked]: 

[5] "bash-minimal" should be in 'inputs' when 'wrap-program' is used

From 2348c2290966e6480897f89e0ca6fdc555b6d41f Mon Sep 17 00:00:00 2001
From: Luis Felipe <[email-masked]>
Date: Tue, 7 Feb 2023 10:49:31 -0500
Subject: [PATCH] gnu: ibus-speech-to-text: Fix execution of ibus-engine-stt.

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

* gnu/packages/ibus.scm (ibus-speech-to-text)[phases]: Remove path to
ibus-stt directory from GI_TYPELIB_PATH, since it doesn't provide
typelibs. Remove path to ibus' typelibs directory from
GUIX_PYTHONPATH, since it doesn't provide Python modules. Remove
unnecessary delimiters from all environment variables.
---
 gnu/packages/ibus.scm | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 4c45671acc..b1f573a875 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2021 Songlin Jiang <[email-masked]>
 ;;; Copyright © 2021 Taiju HIGASHI <[email-masked]>
 ;;; Copyright © 2022 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2023 Luis Felipe López Acevedo <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -882,21 +883,16 @@ (define-public ibus-speech-to-text
              (let ((out (assoc-ref outputs "out")))
                (for-each (lambda (prog)
                            (wrap-program prog
-                             `("GST_PLUGIN_PATH" ":" prefix
+                             `("GST_PLUGIN_PATH" prefix
                                (,(string-append (assoc-ref inputs "gst-vosk")
                                                 "/lib/gstreamer-1.0")
                                 ,(getenv "GST_PLUGIN_SYSTEM_PATH")))
-                             `("GUIX_PYTHONPATH" ":" prefix
+                             `("GUIX_PYTHONPATH" prefix
                                (,(getenv "GUIX_PYTHONPATH")
-                                ,(string-append (assoc-ref inputs "ibus")
-                                                "/lib/girepository-1.0")
                                 ,(string-append (assoc-ref outputs "out")
                                                 "/share/ibus-stt")))
-                             `("GI_TYPELIB_PATH" ":" prefix
-                               (,(string-append (assoc-ref inputs "ibus")
-                                                "/lib/girepository-1.0")
-                                ,(string-append (assoc-ref outputs "out")
-                                                "/share/ibus-stt")))))
+                             `("GI_TYPELIB_PATH" =
+                               (,(getenv "GI_TYPELIB_PATH")))))
                          (list (string-append out "/libexec/ibus-engine-stt")
                                (string-append out "/libexec/ibus-setup-stt")))))))))
     (inputs

base-commit: 1f684d00d25f0f205c4cc4b762d8f56911062581
-- 
2.38.1