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

From: Liliana Marie Prikler <[email-masked]>
Date: Fri, 10 Feb 2023 07:42:36 +0100

Am Donnerstag, dem 09.02.2023 um 19:33 +0000 schrieb Luis Felipe:
> 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"))))
No, I meant more like 
  (add-after 'set-paths 'add-output-to-pythonpath
    (lambda* (#:key outputs #:allow-other-keys)
       (setenv ...)))
Confer %standard-phases in (guix build python-build-system) or 
(guix build pyproject-build-system) for the ordering of phases there. 
I'm fairly certain that GUIX_PYTHONPATH is configured rather soon-ish.

> 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.
When you do, don't forget to CC <[email-masked]>.

Thanks