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

From: Luis Felipe <[email-masked]>
Date: Thu, 09 Feb 2023 19:33:42 +0000

Hi Liliana,

> > Remove path to ibus' typelibs directory from GUIX_PYTHONPATH, since
> > it doesn't provide Python modules.
> 

> I think you should also use getenv here. I think we should mimic
> python-build-system here and add the output directory to
> GUIX_PYTHONPATH before it gets wrapped.

I'm not sure I understand this part. Do you mean something like this (set GUIX_PYTHONPATH in the let definitions)?:

(let* ((out (assoc-ref outputs "out"))
       (ibus-stt-dir (string-append out "/share/ibus-stt"))
       (guix-pythonpath
        (setenv "GUIX_PYTHONPATH"
                (string-append ibus-stt-dir ":"
                               (getenv "GUIX_PYTHONPATH")))))
  (for-each (lambda (prog)
              (wrap-program prog
                `("GST_PLUGIN_PATH" ":" prefix
                  (,(string-append (assoc-ref inputs "gst-vosk")
                                   "/lib/gstreamer-1.0")
                   ,(getenv "GST_PLUGIN_SYSTEM_PATH")))
                `("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"))))

In the meantime, I just sent a new version of the patch using git send-email to refresh my memory (haven't used it in years) and check whether automatic tasks are triggered in the infrastructure. The new patch amends the commit message and puts delimiters back. I will send another version later once I understand what is left to be done, together with the other patch to fix lint issues, as you suggested.