diff mbox series

[bug#63499,gnome-team,3/3] gnu: gtksourceview: Fix build.

Message ID 3e89f7f30708b5702e1283534348cfc486ec0c61.1684060546.git.liliana.prikler@gmail.com
State New
Headers show
Series To GTK and beyond | expand

Commit Message

Liliana Marie Prikler May 13, 2023, 8:27 p.m. UTC
* gnu/packages/gtk.scm (gtksourceview)[#:phases]<pre-check>: Set “GDK_BACKEND”
and “GTK_A11Y”.
---
 gnu/packages/gtk.scm | 3 +++
 1 file changed, 3 insertions(+)

Comments

Maxim Cournoyer May 15, 2023, 1:49 p.m. UTC | #1
Hello,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> * gnu/packages/gtk.scm (gtksourceview)[#:phases]<pre-check>: Set “GDK_BACKEND”
> and “GTK_A11Y”.
> ---
>  gnu/packages/gtk.scm | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
> index de45eb3870..7d76610293 100644
> --- a/gnu/packages/gtk.scm
> +++ b/gnu/packages/gtk.scm
> @@ -616,6 +616,9 @@ (define-public gtksourceview
>                 ;; Tests require a running X server.
>                 (system (string-append Xvfb " :1 &"))
>                 (setenv "DISPLAY" ":1")
> +               ;; For GTK

Nitpick: Add a full stop (period) for standalone comments.  Perhaps
expound how these environment variables are useful to set ('For GTK'
leaves me wondering, as 'gtksourceview' already seems GTK-focused).

> +               (setenv "GDK_BACKEND" "x11")
> +               (setenv "GTK_A11Y" "none")
>                 ;; For the missing /etc/machine-id.
>                 (setenv "DBUS_FATAL_WARNINGS" "0")))))))
>      (native-inputs

Otherwise, LGTM.
Liliana Marie Prikler May 15, 2023, 6:27 p.m. UTC | #2
Am Montag, dem 15.05.2023 um 09:49 -0400 schrieb Maxim Cournoyer:
> Hello,
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> 
> > * gnu/packages/gtk.scm (gtksourceview)[#:phases]<pre-check>: Set
> > “GDK_BACKEND”
> > and “GTK_A11Y”.
> > ---
> >  gnu/packages/gtk.scm | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
> > index de45eb3870..7d76610293 100644
> > --- a/gnu/packages/gtk.scm
> > +++ b/gnu/packages/gtk.scm
> > @@ -616,6 +616,9 @@ (define-public gtksourceview
> >                 ;; Tests require a running X server.
> >                 (system (string-append Xvfb " :1 &"))
> >                 (setenv "DISPLAY" ":1")
> > +               ;; For GTK
> 
> Nitpick: Add a full stop (period) for standalone comments.  Perhaps
> expound how these environment variables are useful to set ('For GTK'
> leaves me wondering, as 'gtksourceview' already seems GTK-focused).
Full disclosure, I don't quite understand what's wrong here myself, but
with the upgrade to GTK 4.10, tests fail
- due to GDK_BACKEND not being said for ??? reason
- due to GTK_A11Y because GTK tries to spawn dbus and fails to connect.

> 
If there's a better wording for that, I'm all ears :)
Maxim Cournoyer May 15, 2023, 7:44 p.m. UTC | #3
Hi,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Montag, dem 15.05.2023 um 09:49 -0400 schrieb Maxim Cournoyer:
>> Hello,
>> 
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>> 
>> > * gnu/packages/gtk.scm (gtksourceview)[#:phases]<pre-check>: Set
>> > “GDK_BACKEND”
>> > and “GTK_A11Y”.
>> > ---
>> >  gnu/packages/gtk.scm | 3 +++
>> >  1 file changed, 3 insertions(+)
>> > 
>> > diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
>> > index de45eb3870..7d76610293 100644
>> > --- a/gnu/packages/gtk.scm
>> > +++ b/gnu/packages/gtk.scm
>> > @@ -616,6 +616,9 @@ (define-public gtksourceview
>> >                 ;; Tests require a running X server.
>> >                 (system (string-append Xvfb " :1 &"))
>> >                 (setenv "DISPLAY" ":1")
>> > +               ;; For GTK
>> 
>> Nitpick: Add a full stop (period) for standalone comments.  Perhaps
>> expound how these environment variables are useful to set ('For GTK'
>> leaves me wondering, as 'gtksourceview' already seems GTK-focused).
> Full disclosure, I don't quite understand what's wrong here myself, but
> with the upgrade to GTK 4.10, tests fail
> - due to GDK_BACKEND not being said for ??? reason
> - due to GTK_A11Y because GTK tries to spawn dbus and fails to connect.
>
>> 
> If there's a better wording for that, I'm all ears :)

Perhaps above setenv "GTK_BACKEND" mention "XXX: To avoid failures in
tests." and then above GTK_A11Y mention "Otherwise, GTK tries to spawn
D-Bus and fails to connect."

This captures everything you know; I think it's an improvement.
Liliana Marie Prikler May 27, 2023, 2:25 p.m. UTC | #4
Am Montag, dem 15.05.2023 um 15:44 -0400 schrieb Maxim Cournoyer:
> Hi,
> 
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> 
> > Am Montag, dem 15.05.2023 um 09:49 -0400 schrieb Maxim Cournoyer:
> > > Hello,
> > > 
> > > Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> > > 
> > > > * gnu/packages/gtk.scm (gtksourceview)[#:phases]<pre-check>:
> > > > Set
> > > > “GDK_BACKEND”
> > > > and “GTK_A11Y”.
> > > > ---
> > > >  gnu/packages/gtk.scm | 3 +++
> > > >  1 file changed, 3 insertions(+)
> > > > 
> > > > diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
> > > > index de45eb3870..7d76610293 100644
> > > > --- a/gnu/packages/gtk.scm
> > > > +++ b/gnu/packages/gtk.scm
> > > > @@ -616,6 +616,9 @@ (define-public gtksourceview
> > > >                 ;; Tests require a running X server.
> > > >                 (system (string-append Xvfb " :1 &"))
> > > >                 (setenv "DISPLAY" ":1")
> > > > +               ;; For GTK
> > > 
> > > Nitpick: Add a full stop (period) for standalone comments. 
> > > Perhaps
> > > expound how these environment variables are useful to set ('For
> > > GTK'
> > > leaves me wondering, as 'gtksourceview' already seems GTK-
> > > focused).
> > Full disclosure, I don't quite understand what's wrong here myself,
> > but
> > with the upgrade to GTK 4.10, tests fail
> > - due to GDK_BACKEND not being said for ??? reason
> > - due to GTK_A11Y because GTK tries to spawn dbus and fails to
> > connect.
> > 
> > > 
> > If there's a better wording for that, I'm all ears :)
> 
> Perhaps above setenv "GTK_BACKEND" mention "XXX: To avoid failures in
> tests." and then above GTK_A11Y mention "Otherwise, GTK tries to
> spawn D-Bus and fails to connect."
> 
> This captures everything you know; I think it's an improvement.
Reworded a little and pushed with GStreamer 1.22.3.

Cheers
diff mbox series

Patch

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index de45eb3870..7d76610293 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -616,6 +616,9 @@  (define-public gtksourceview
                ;; Tests require a running X server.
                (system (string-append Xvfb " :1 &"))
                (setenv "DISPLAY" ":1")
+               ;; For GTK
+               (setenv "GDK_BACKEND" "x11")
+               (setenv "GTK_A11Y" "none")
                ;; For the missing /etc/machine-id.
                (setenv "DBUS_FATAL_WARNINGS" "0")))))))
     (native-inputs