guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/07: gnu: ibus-speech-to-text: Fix execution of ibus-engine-stt.


From: guix-commits
Subject: 01/07: gnu: ibus-speech-to-text: Fix execution of ibus-engine-stt.
Date: Sun, 12 Feb 2023 02:51:16 -0500 (EST)

lilyp pushed a commit to branch master
in repository guix.

commit 59e2e0744b7a3893003557e70fc60aec853efa22
Author: Luis Felipe <luis.felipe.la@protonmail.com>
AuthorDate: Fri Feb 10 13:49:23 2023 -0500

    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]
    <add-install-to-pythonpath>: New phase.
    <wrap-additional-paths>: Use getenv to set GUIX_PYTHONPATH and 
GI_TYPELIB_PATH.
    
    Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
 gnu/packages/ibus.scm | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index 4c45671acc..0371310992 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2021 Songlin Jiang <hollowman@hollowman.ml>
 ;;; Copyright © 2021 Taiju HIGASHI <higashi@taiju.info>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -875,6 +876,13 @@ hanja dictionary and small hangul character 
classification.")
              (substitute* "meson.build"
                (("update_desktop_database: true")
                 "update_desktop_database: false"))))
+         (add-after 'set-paths 'add-install-to-pythonpath
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (ibus-stt-dir (string-append out "/share/ibus-stt")))
+               (setenv "GUIX_PYTHONPATH"
+                       (string-append ibus-stt-dir ":"
+                                      (getenv "GUIX_PYTHONPATH"))))))
          (add-after 'install 'wrap-with-additional-paths
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Make sure 'ibus-{setup,engine}-stt' find the gst-vosk plugin
@@ -886,17 +894,10 @@ hanja dictionary and small hangul character 
classification.")
                                (,(string-append (assoc-ref inputs "gst-vosk")
                                                 "/lib/gstreamer-1.0")
                                 ,(getenv "GST_PLUGIN_SYSTEM_PATH")))
-                             `("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")))))
+                             `("GUIX_PYTHONPATH" =
+                               (,(getenv "GUIX_PYTHONPATH")))
+                             `("GI_TYPELIB_PATH" =
+                               (,(getenv "GI_TYPELIB_PATH")))))
                          (list (string-append out "/libexec/ibus-engine-stt")
                                (string-append out 
"/libexec/ibus-setup-stt")))))))))
     (inputs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]