* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
@ 2023-05-10 18:50 Nathan Dehnel
2023-05-10 22:24 ` bug#63427: Sharlatan Hellseher
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
0 siblings, 2 replies; 19+ messages in thread
From: Nathan Dehnel @ 2023-05-10 18:50 UTC (permalink / raw)
To: 63427
Gtk:ERROR:gtkiconhelper.c:494:
ensure_surface_for_gicon: assertion
failed (error == NULL): Failed to load
/run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon:
assertion failed (error == NULL): Failed to load
/run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
Unrecognized image file format (gdk-pixbuf-error-quark, 3)
This is breaking various apps like viewnior, xfce4-power-manager,
causing firefox to crash when opening the file picker, making app
icons not appear, etc.
guix version b7e7744
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427:
2023-05-10 18:50 bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Nathan Dehnel
@ 2023-05-10 22:24 ` Sharlatan Hellseher
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
1 sibling, 0 replies; 19+ messages in thread
From: Sharlatan Hellseher @ 2023-05-10 22:24 UTC (permalink / raw)
To: 63427
Hi,
How to reproduce the issue? May you, please provide some steps please.
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-10 18:50 bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Nathan Dehnel
2023-05-10 22:24 ` bug#63427: Sharlatan Hellseher
@ 2023-05-11 8:05 ` Josselin Poiret via Bug reports for GNU Guix
2023-05-11 11:04 ` pelzflorian (Florian Pelz)
2023-05-11 19:11 ` Liliana Marie Prikler
1 sibling, 2 replies; 19+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-05-11 8:05 UTC (permalink / raw)
To: Nathan Dehnel, 63427
[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
Hi Nathan,
Nathan Dehnel <ncdehnel@gmail.com> writes:
> Gtk:ERROR:gtkiconhelper.c:494:
> ensure_surface_for_gicon: assertion
> failed (error == NULL): Failed to load
> /run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
> Unrecognized image file format (gdk-pixbuf-error-quark, 3)
> Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon:
> assertion failed (error == NULL): Failed to load
> /run/current-system/profile/share/icons/Adwaita/16x16/status/image-missing.png:
> Unrecognized image file format (gdk-pixbuf-error-quark, 3)
>
> This is breaking various apps like viewnior, xfce4-power-manager,
> causing firefox to crash when opening the file picker, making app
> icons not appear, etc.
So, GDK Pixbuf has a dynamic loader mechanism, where additional formats
can be added via additional loaders, which are usually all installed in
the same directory. In Guix, this means that we need to point GDK
Pixbuf to a list of loaders to use that is dependent on what is
installed (there's no easy way to record this per-package, embed it
inside of it and then use that only there like with the ld cache). For
that, we use the environment variable GDK_PIXBUF_MODULE_FILE, which is a
search-path for the package gdk-pixbuf, meaning that it is set only if
gdk-pixbuf is installed in your profile.
Now, if we had packaged everything properly, all the applications you
mention should *propagate* gdk-pixbuf and not just list it as an input,
so that it always gets installed to the profile as well, but that's not
the case! The reason it doesn't happen for other users is because they
have some applications which pull in gdk-pixbuf inside the profile! So
we should fix this and propagate gdk-pixbuf everywhere (something which
I'm not too much a fan of, but alas).
In the meantime, you can manually install gdk-pixbuf to your profile,
log-out and log-in and it should hopefully work.
Best,
--
Josselin Poiret
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
@ 2023-05-11 11:04 ` pelzflorian (Florian Pelz)
2023-05-11 19:11 ` Liliana Marie Prikler
1 sibling, 0 replies; 19+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-11 11:04 UTC (permalink / raw)
To: 63427; +Cc: ncdehnel, dev
Hi all.
Josselin Poiret via Bug reports for GNU Guix <bug-guix@gnu.org> writes:
> For
> that, we use the environment variable GDK_PIXBUF_MODULE_FILE, which is a
> search-path for the package gdk-pixbuf, meaning that it is set only if
> gdk-pixbuf is installed in your profile. […] So
> we should fix this and propagate gdk-pixbuf everywhere (something which
> I'm not too much a fan of, but alas).
The cambalache package does the right thing by wrapping the program to
setenv GDK_PIXBUF_MODULE_FILE to the value it has while building the
package. glib-or-gtk build system sets GDK_PIXBUF_MODULE_FILE while
building the package. Note that gdkpixbuf and perhaps
librsvg-for-system must be in inputs.
Regards,
Florian
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
2023-05-11 11:04 ` pelzflorian (Florian Pelz)
@ 2023-05-11 19:11 ` Liliana Marie Prikler
2023-05-11 21:22 ` Nathan Dehnel
1 sibling, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-05-11 19:11 UTC (permalink / raw)
To: Josselin Poiret, Nathan Dehnel, 63427
Am Donnerstag, dem 11.05.2023 um 10:05 +0200 schrieb Josselin Poiret:
> Now, if we had packaged everything properly, all the applications you
> mention should *propagate* gdk-pixbuf and not just list it as an
> input
No. Propagated inputs are *never* the result of proper packaging.
More often than not, they create more issues than they solve by
reducing Guix to the capabilities of a dumb package manager. While
yes, they have been accepted as a solution to some issues (e.g. pkg-
config not finding inputs), this by no means translates to "oh,
something's not found, let's propagate an input". However, even for
those cases where they have become accepted practice, we ought to look
for better solutions, as proliferating propagations do end up biting us
in the form of conflicts.
The only instance in which propagated inputs behave as intended is with
meta packages; there they are even slightly less clunky than their
alternative (union builds).
As for the actual problem at hand, the solution has already been
pointed out by Florian: wrapping commands to bind
GDK_PIXBUF_MODULE_FILE. Sadly, Florian didn't point these unwanted
side effects of propagation, as contributors are often unaware of them.
Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 19:11 ` Liliana Marie Prikler
@ 2023-05-11 21:22 ` Nathan Dehnel
2023-05-12 9:19 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 19+ messages in thread
From: Nathan Dehnel @ 2023-05-11 21:22 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: Josselin Poiret, 63427
Installing gdk-pixbuf and rebooting didn't fix the issue:
viewnior '/home/nathan/Downloads/from-phone/Pictures/Screenshots/Screenshot_20230509-183317_F-Droid.png'
(viewnior:2482): Gtk-WARNING **: 16:14:57.820: Unable to locate theme
engine in module_path: "adwaita",
(viewnior:2482): Gtk-WARNING **: 16:14:57.822: Unable to locate theme
engine in module_path: "adwaita",
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6:
version `GLIBC_2.34' not found (required by
/gnu/store/yr4lbvdyc4dgs76yij1dw2w2z8s84af8-gnutls-3.7.7/lib/libgnutls.so.30)
Failed to load module:
/home/nathan/.guix-profile/lib/gio/modules/libgiognutls.so
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/libc.so.6:
version `GLIBC_2.34' not found (required by
/gnu/store/8sfnwc672lswqgkf9g5qv7r5247jyipp-libproxy-0.4.17/lib/libproxy.so.1)
Failed to load module:
/home/nathan/.guix-profile/lib/gio/modules/libgiolibproxy.so
** (viewnior:2482): WARNING **: 16:14:57.853: Pixbuf theme: Cannot
load pixmap file
/run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png:
Couldn’t recognize the image file format for file
“/run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png”
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
** (viewnior:2482): WARNING **: 16:14:57.853: Invalid borders
specified for theme pixmap:
/run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png,
borders don't fit within the image
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
** (viewnior:2482): WARNING **: 16:14:57.853: Invalid borders
specified for theme pixmap:
/run/current-system/profile/share/themes/Adwaita-dark/gtk-2.0/assets/line.png,
borders don't fit within the image
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)'
failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(viewnior:2482): GdkPixbuf-CRITICAL **: 16:14:57.853:
gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
On Thu, May 11, 2023 at 2:11 PM Liliana Marie Prikler
<liliana.prikler@gmail.com> wrote:
>
> Am Donnerstag, dem 11.05.2023 um 10:05 +0200 schrieb Josselin Poiret:
> > Now, if we had packaged everything properly, all the applications you
> > mention should *propagate* gdk-pixbuf and not just list it as an
> > input
> No. Propagated inputs are *never* the result of proper packaging.
> More often than not, they create more issues than they solve by
> reducing Guix to the capabilities of a dumb package manager. While
> yes, they have been accepted as a solution to some issues (e.g. pkg-
> config not finding inputs), this by no means translates to "oh,
> something's not found, let's propagate an input". However, even for
> those cases where they have become accepted practice, we ought to look
> for better solutions, as proliferating propagations do end up biting us
> in the form of conflicts.
>
> The only instance in which propagated inputs behave as intended is with
> meta packages; there they are even slightly less clunky than their
> alternative (union builds).
>
> As for the actual problem at hand, the solution has already been
> pointed out by Florian: wrapping commands to bind
> GDK_PIXBUF_MODULE_FILE. Sadly, Florian didn't point these unwanted
> side effects of propagation, as contributors are often unaware of them.
>
> Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-11 21:22 ` Nathan Dehnel
@ 2023-05-12 9:19 ` pelzflorian (Florian Pelz)
2023-05-12 21:21 ` Nathan Dehnel
0 siblings, 1 reply; 19+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-12 9:19 UTC (permalink / raw)
To: Nathan Dehnel; +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
Nathan, could you try running this command:
guix shell --pure viewnior gdk-pixbuf -- viewnior
For me this works now. My guess is that for you, something else breaks
viewnior and --pure can help.
Regards,
Florian
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-12 9:19 ` pelzflorian (Florian Pelz)
@ 2023-05-12 21:21 ` Nathan Dehnel
2023-05-13 10:49 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 19+ messages in thread
From: Nathan Dehnel @ 2023-05-12 21:21 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
Yes, that one works
On Fri, May 12, 2023 at 4:27 AM pelzflorian (Florian Pelz)
<pelzflorian@pelzflorian.de> wrote:
>
> Nathan, could you try running this command:
>
> guix shell --pure viewnior gdk-pixbuf -- viewnior
>
> For me this works now. My guess is that for you, something else breaks
> viewnior and --pure can help.
>
> Regards,
> Florian
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-12 21:21 ` Nathan Dehnel
@ 2023-05-13 10:49 ` pelzflorian (Florian Pelz)
2023-05-13 13:50 ` Liliana Marie Prikler
0 siblings, 1 reply; 19+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-13 10:49 UTC (permalink / raw)
To: Nathan Dehnel; +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
[-- Attachment #1: Type: text/plain, Size: 845 bytes --]
Nathan Dehnel <ncdehnel@gmail.com> writes:
> Yes, that one works
That’s good. This means maybe either
- if guix shell without --pure works too, you just have not run “guix
upgrade” recently, or
- --pure helped and viewnior is not compatible with the Adwaita dark
theme, or
- --pure helped because you have misconfigured something that breaks the
installed viewnior, but leaves the pure one intact.
What remains as a bug is wrapping the viewnior program inside
gdk-pixbuf, so installing gdk-pixbuf is not needed anymore. Untested
patch is attached.
But then other image loaders installed by the user to support
e.g. libexif would not be usable anymore. We could also add libexif,
but do we even want the attached patch? Or should it be up to the user
to install image loaders?
Regards,
Florian
[-- Attachment #2: viewnior-Support-image-formats-out-of-the-box.patch --]
[-- Type: text/x-patch, Size: 2992 bytes --]
From 29c76710eea6720aa4b5e774a83ce19e577937ac Mon Sep 17 00:00:00 2001
Message-Id: <29c76710eea6720aa4b5e774a83ce19e577937ac.1683974741.git.pelzflorian@pelzflorian.de>
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 13 May 2023 12:33:26 +0200
Subject: [PATCH] gnu: viewnior: Support image formats out of the box.
* gnu/packages/image-viewers.scm (viewnior)
[inputs]: Add 'librsvg-for-system'.
[arguments]: Enable 'glib-or-gtk?' to make available
GDK_PIXBUF_MODULE_FILE. Wrap viewnior to use it instead
of the image loaders installed by the user.
---
gnu/packages/image-viewers.scm | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index db7a44d4ff..bbe26aadbe 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2022 Cairn <cairn@pm.me>
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -425,12 +426,22 @@ (define-public viewnior
(base32 "14qvx1wajncd5ab0207274cwk32f4ipfnlaci6phmah0cwra2did"))))
(build-system meson-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
+ '(#:glib-or-gtk? #t
+ #:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-source
(lambda _
;; Don't create 'icon-theme.cache'
(substitute* "meson.build"
- (("meson.add_install_script*") "")))))
+ (("meson.add_install_script*") ""))))
+ (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((viewnior (string-append #$output "/bin/viewnior")))
+ (wrap-program viewnior
+ ;; Wrap GDK_PIXBUF_MODULE_FILE so viewnior can be used
+ ;; to view JPG, PNG and SVG, without the user needing
+ ;; to install gdk-pixbuf or librsvg.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
#:tests? #f)) ;no tests
(native-inputs
(list gettext-minimal
@@ -440,7 +451,8 @@ (define-public viewnior
(inputs
(list exiv2
gdk-pixbuf
- gtk+-2))
+ gtk+-2
+ (librsvg-for-system)))
(home-page "https://siyanpanayotov.com/project/viewnior")
(synopsis "Simple, fast and elegant image viewer")
(description "Viewnior is an image viewer program. Created to be simple,
base-commit: e3e011a08141058598cc7631aeb52d620a3ccb8c
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-13 10:49 ` pelzflorian (Florian Pelz)
@ 2023-05-13 13:50 ` Liliana Marie Prikler
2023-05-13 18:38 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2023-05-13 13:50 UTC (permalink / raw)
To: pelzflorian (Florian Pelz), Nathan Dehnel; +Cc: Josselin Poiret, 63427
Am Samstag, dem 13.05.2023 um 12:49 +0200 schrieb pelzflorian (Florian
Pelz):
> But then other image loaders installed by the user to support
> e.g. libexif would not be usable anymore. We could also add libexif,
> but do we even want the attached patch? Or should it be up to the
> user to install image loaders?
Given that $GDK_PIXBUF_MODULE_FILE is bound and not PATH-like, it would
be up to the package to declare those dependencies. Perhaps we ought
to have a meta-package for gdk-pixbuf with all available loaders.
Lacking that it's up to the packager to decide which formats are
important and add each one manually; though note that this practice
also allows users to override said defaults with proper modify-inputs.
Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-13 13:50 ` Liliana Marie Prikler
@ 2023-05-13 18:38 ` pelzflorian (Florian Pelz)
2023-05-15 5:18 ` Nathan Dehnel
2025-01-15 5:26 ` Maxim Cournoyer
0 siblings, 2 replies; 19+ messages in thread
From: pelzflorian (Florian Pelz) @ 2023-05-13 18:38 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: Nathan Dehnel, Josselin Poiret, 63427
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
Hi Liliana and all. Until now the user could decide what image loaders
to install alongside. Or so I thought. However, surprisingly I cannot
get any other loader except gdk-pixbuf and librsvg to work anyway.
That is,
guix shell viewnior webp-pixbuf-loader
surprisingly does not see webp files. I do not understand.
If this changed patch looks fine, now with proper gexp use, I will push
it. The patch continues to include gdk-pixbuf among the inputs even
though gtk+@2 propagates gdk-pixbuf anyway, but better be explicit.
Regards,
Florian
[-- Attachment #2: viewnior-Support-image-formats-out-of-the-box.patch --]
[-- Type: text/x-patch, Size: 3294 bytes --]
From 6acc7322695a13c326918c4b83a999e324406b21 Mon Sep 17 00:00:00 2001
Message-Id: <6acc7322695a13c326918c4b83a999e324406b21.1684001649.git.pelzflorian@pelzflorian.de>
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 13 May 2023 12:33:26 +0200
Subject: [PATCH] gnu: viewnior: Support image formats out of the box.
* gnu/packages/image-viewers.scm (viewnior)
[inputs]: Add 'librsvg-for-system'.
[arguments]: Enable 'glib-or-gtk?' to make available
GDK_PIXBUF_MODULE_FILE. Wrap viewnior to use it instead
of the image loaders installed by the user.
---
gnu/packages/image-viewers.scm | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index db7a44d4ff..798a8e50e8 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2022 Cairn <cairn@pm.me>
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -425,13 +426,24 @@ (define-public viewnior
(base32 "14qvx1wajncd5ab0207274cwk32f4ipfnlaci6phmah0cwra2did"))))
(build-system meson-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'patch-source
- (lambda _
- ;; Don't create 'icon-theme.cache'
- (substitute* "meson.build"
- (("meson.add_install_script*") "")))))
- #:tests? #f)) ;no tests
+ (list #:glib-or-gtk? #t
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ ;; Don't create 'icon-theme.cache'
+ (substitute* "meson.build"
+ (("meson.add_install_script*") ""))))
+ (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((viewnior (string-append #$output "/bin/viewnior")))
+ (wrap-program viewnior
+ ;; Wrap GDK_PIXBUF_MODULE_FILE so viewnior can be used
+ ;; to view JPG, PNG and SVG, without the user needing
+ ;; to install gdk-pixbuf or librsvg.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
+ #:tests? #f)) ;no tests
(native-inputs
(list gettext-minimal
`(,glib "bin") ;glib-genmarshal
@@ -440,7 +452,8 @@ (define-public viewnior
(inputs
(list exiv2
gdk-pixbuf
- gtk+-2))
+ gtk+-2
+ (librsvg-for-system)))
(home-page "https://siyanpanayotov.com/project/viewnior")
(synopsis "Simple, fast and elegant image viewer")
(description "Viewnior is an image viewer program. Created to be simple,
base-commit: e3e011a08141058598cc7631aeb52d620a3ccb8c
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-13 18:38 ` pelzflorian (Florian Pelz)
@ 2023-05-15 5:18 ` Nathan Dehnel
2025-01-15 5:26 ` Maxim Cournoyer
1 sibling, 0 replies; 19+ messages in thread
From: Nathan Dehnel @ 2023-05-15 5:18 UTC (permalink / raw)
To: pelzflorian (Florian Pelz); +Cc: Josselin Poiret, Liliana Marie Prikler, 63427
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
With another update, the errors went away. Thanks
On Sat, May 13, 2023, 13:38 pelzflorian (Florian Pelz) <
pelzflorian@pelzflorian.de> wrote:
> Hi Liliana and all. Until now the user could decide what image loaders
> to install alongside. Or so I thought. However, surprisingly I cannot
> get any other loader except gdk-pixbuf and librsvg to work anyway.
>
> That is,
>
> guix shell viewnior webp-pixbuf-loader
>
> surprisingly does not see webp files. I do not understand.
>
> If this changed patch looks fine, now with proper gexp use, I will push
> it. The patch continues to include gdk-pixbuf among the inputs even
> though gtk+@2 propagates gdk-pixbuf anyway, but better be explicit.
>
> Regards,
> Florian
>
[-- Attachment #2: Type: text/html, Size: 1046 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2023-05-13 18:38 ` pelzflorian (Florian Pelz)
2023-05-15 5:18 ` Nathan Dehnel
@ 2025-01-15 5:26 ` Maxim Cournoyer
2025-01-15 14:28 ` pelzflorian (Florian Pelz)
1 sibling, 1 reply; 19+ messages in thread
From: Maxim Cournoyer @ 2025-01-15 5:26 UTC (permalink / raw)
To: pelzflorian (Florian Pelz)
Cc: Nathan Dehnel, Josselin Poiret, Liliana Marie Prikler, 63427
Hi,
"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> writes:
> Hi Liliana and all. Until now the user could decide what image loaders
> to install alongside. Or so I thought. However, surprisingly I cannot
> get any other loader except gdk-pixbuf and librsvg to work anyway.
>
> That is,
>
> guix shell viewnior webp-pixbuf-loader
>
> surprisingly does not see webp files. I do not understand.
Try again with:
--8<---------------cut here---------------start------------->8---
guix shell viewnior gdk-pixbuf webp-pixbuf-loader
--8<---------------cut here---------------end--------------->8---
You need to add gdk-pixbuf as the GDK_PIXBUF_MODULE_FILE search path is
defined on this package, and this currently gets computed per-profile.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2025-01-15 5:26 ` Maxim Cournoyer
@ 2025-01-15 14:28 ` pelzflorian (Florian Pelz)
2025-01-15 15:07 ` Liliana Marie Prikler
0 siblings, 1 reply; 19+ messages in thread
From: pelzflorian (Florian Pelz) @ 2025-01-15 14:28 UTC (permalink / raw)
To: Maxim Cournoyer
Cc: Nathan Dehnel, Josselin Poiret, Liliana Marie Prikler, 63427
[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]
Thank you Maxim for waking up the bug and giving an essential hint,
because I did not understand the bug anymore.
Indeed, without wrapping GDK_PIXBUF_MODULE_FILE as in my patch
guix shell --pure viewnior gdk-pixbuf webp-pixbuf-loader
does open webp files fine.
Wrapping it with the attached patch,
guix shell --pure viewnior
also opens webp files fine, but only after I have added
webp-pixbuf-loader to viewnior’s inputs.
But wrapping inhibits webp-pixbuf-loader when I don’t add it to inputs
even with
guix shell --pure viewnior gdk-pixbuf webp-pixbuf-loader
So wrapping apparently hard-codes which input formats there are.
Notably librsvg exceptionally does not need to be added explicitly.
Is it better to wrap viewnior and hard-code the supported image formats,
as I wanted, so installing only viewnior is enough?
Or better drop the attached patch and users need to install gdk-pixbuf
webp-pixbuf-loader as well?
I tend to prefer to wrap viewnior.
Regards,
Florian
[-- Attachment #2: viewnior-Support-image-formats-out-of-the-box.patch --]
[-- Type: text/x-patch, Size: 3565 bytes --]
From 54746d297c7e3de10001a270867beb031afca0df Mon Sep 17 00:00:00 2001
Message-ID: <54746d297c7e3de10001a270867beb031afca0df.1736950227.git.pelzflorian@pelzflorian.de>
From: Florian Pelz <pelzflorian@pelzflorian.de>
Date: Sat, 13 May 2023 12:33:26 +0200
Subject: [PATCH] gnu: viewnior: Support image formats out of the box.
* gnu/packages/image-viewers.scm (viewnior)
[inputs]: TODO Add 'librsvg-for-system', 'webp-pixbuf-loader'.
[arguments]: Enable 'glib-or-gtk?' to make available
GDK_PIXBUF_MODULE_FILE. Wrap viewnior to use it instead
of the image loaders installed by the user.
Change-Id: I86b7c2845af2fc1d3fdf4032b2208493a6868546
---
gnu/packages/image-viewers.scm | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/image-viewers.scm b/gnu/packages/image-viewers.scm
index cb4e903f39..8c679ac2fb 100644
--- a/gnu/packages/image-viewers.scm
+++ b/gnu/packages/image-viewers.scm
@@ -27,6 +27,7 @@
;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
;;; Copyright © 2022 Cairn <cairn@pm.me>
+;;; Copyright © 2023 Florian Pelz <pelzflorian@pelzflorian.de>
;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -427,13 +428,24 @@ (define-public viewnior
(base32 "14qvx1wajncd5ab0207274cwk32f4ipfnlaci6phmah0cwra2did"))))
(build-system meson-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'patch-source
- (lambda _
- ;; Don't create 'icon-theme.cache'
- (substitute* "meson.build"
- (("meson.add_install_script*") "")))))
- #:tests? #f)) ;no tests
+ (list #:glib-or-gtk? #t
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda _
+ ;; Don't create 'icon-theme.cache'
+ (substitute* "meson.build"
+ (("meson.add_install_script*") ""))))
+ (add-after 'glib-or-gtk-wrap 'wrap-pixbuf
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((viewnior (string-append #$output "/bin/viewnior")))
+ (wrap-program viewnior
+ ;; Wrap GDK_PIXBUF_MODULE_FILE so viewnior can be used
+ ;; to view JPG, PNG and SVG, without the user needing
+ ;; to install gdk-pixbuf or librsvg.
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))))
+ #:tests? #f)) ;no tests
(native-inputs
(list gettext-minimal
`(,glib "bin") ;glib-genmarshal
@@ -442,7 +454,10 @@ (define-public viewnior
(inputs
(list exiv2
gdk-pixbuf
- gtk+-2))
+ gtk+-2
+ ;; not needed, there is SVG support already: (librsvg-for-system)
+ ;; uncomment for webp support: webp-pixbuf-loader
+ ))
(home-page "https://siyanpanayotov.com/project/viewnior")
(synopsis "Simple, fast and elegant image viewer")
(description "Viewnior is an image viewer program. Created to be simple,
base-commit: 15a41ec5a7f0629f78ede29bd7867cd8dc22c992
--
2.47.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2025-01-15 14:28 ` pelzflorian (Florian Pelz)
@ 2025-01-15 15:07 ` Liliana Marie Prikler
2025-01-16 7:50 ` pelzflorian (Florian Pelz)
2025-01-17 3:18 ` Maxim Cournoyer
0 siblings, 2 replies; 19+ messages in thread
From: Liliana Marie Prikler @ 2025-01-15 15:07 UTC (permalink / raw)
To: pelzflorian (Florian Pelz), Maxim Cournoyer
Cc: Nathan Dehnel, Josselin Poiret, 63427
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
Am Mittwoch, dem 15.01.2025 um 15:28 +0100 schrieb pelzflorian (Florian
Pelz):
> Is it better to wrap viewnior and hard-code the supported image
> formats, as I wanted, so installing only viewnior is enough?
>
> Or better drop the attached patch and users need to install gdk-
> pixbuf [and] webp-pixbuf-loader as well?
>
> I tend to prefer to wrap viewnior.
I think wrapping is good, but I don't think we can anticipate all the
formats a user might want. I've attached a patch that allows us to use
"set if unspecified" semantics – not really sure how meaningful those
are – but perhaps we would need a GUIX_-prefixed environment variable
once again. Barring an upstream change from GDK_PIXBUF_MODULE_FILE to
GDK_PIXBUF_MODULE_PATH anyway.
WDYT?
[-- Attachment #2: 0001-guix-wrap-program-Add-logic-for-setting-only-unset-variables.patch --]
[-- Type: text/x-patch, Size: 1813 bytes --]
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 94714bf397..d48b9112b8 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1393,6 +1393,9 @@ (define* (wrap-program prog #:key (sh (which "bash")) #:rest vars)
((var sep '= rest)
(format #f "export ~a=\"~a\""
var (string-join rest sep)))
+ ((var sep ':- rest)
+ (format #f "export ~a=\"${~a:-~a}\""
+ var var (string-join rest sep)))
((var sep 'prefix rest)
(format #f "export ~a=\"~a${~a:+~a}$~a\""
var (string-join rest sep) var sep var))
@@ -1402,6 +1405,9 @@ (define* (wrap-program prog #:key (sh (which "bash")) #:rest vars)
((var '= rest)
(format #f "export ~a=\"~a\""
var (string-join rest ":")))
+ ((var ':- rest)
+ (format #f "export ~a=\"${~a:-~a}\""
+ var var (string-join rest ":")))
((var 'prefix rest)
(format #f "export ~a=\"~a${~a:+:}$~a\""
var (string-join rest ":") var var))
@@ -1470,6 +1476,8 @@ (define wrap-script
(match-lambda
((var sep '= rest)
`(setenv ,var ,(string-join rest sep)))
+ ((var sep ':- rest)
+ `(unless (getenv ,var) (setenv ,var ,(string-join rest sep))))
((var sep 'prefix rest)
`(let ((current (getenv ,var)))
(setenv ,var (if current
@@ -1484,6 +1492,8 @@ (define wrap-script
,(string-join rest sep)))))
((var '= rest)
`(setenv ,var ,(string-join rest ":")))
+ ((var ':- rest)
+ `(unless (getenv ,var) (setenv ,var ,(string-join rest ":"))))
((var 'prefix rest)
`(let ((current (getenv ,var)))
(setenv ,var (if current
^ permalink raw reply related [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2025-01-15 15:07 ` Liliana Marie Prikler
@ 2025-01-16 7:50 ` pelzflorian (Florian Pelz)
2025-01-16 7:57 ` Liliana Marie Prikler
2025-01-17 3:18 ` Maxim Cournoyer
1 sibling, 1 reply; 19+ messages in thread
From: pelzflorian (Florian Pelz) @ 2025-01-16 7:50 UTC (permalink / raw)
To: Liliana Marie Prikler
Cc: Nathan Dehnel, Josselin Poiret, 63427, Maxim Cournoyer
Liliana’s new escape hatch is nice, and indeed GDK_PIXBUF_MODULE_FILE is
unset in
$ guix shell --pure viewnior webp-pixbuf-loader
$ echo $GDK_PIXBUF_MODULE_FILE
but it rebuilds the world. A security-relevant (?) upstream
introduction of GDK_PIXBUF_MODULE_PATH also would have Guix rebuild the
world.
Could I, with your agreement, push the viewnior wrapper patch with
(wrap-program viewnior
`("GDK_PIXBUF_MODULE_FILE" =
in the meantime? The majority of users will not know search paths
anyway perhaps, and viewnior is just one image viewer.
Regards,
Florian
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2025-01-16 7:50 ` pelzflorian (Florian Pelz)
@ 2025-01-16 7:57 ` Liliana Marie Prikler
2025-01-16 14:36 ` pelzflorian (Florian Pelz)
0 siblings, 1 reply; 19+ messages in thread
From: Liliana Marie Prikler @ 2025-01-16 7:57 UTC (permalink / raw)
To: pelzflorian (Florian Pelz)
Cc: Nathan Dehnel, Josselin Poiret, 63427, Maxim Cournoyer
Am Donnerstag, dem 16.01.2025 um 08:50 +0100 schrieb pelzflorian
(Florian Pelz):
> Liliana’s new escape hatch is nice, and indeed GDK_PIXBUF_MODULE_FILE
> is unset in
>
> $ guix shell --pure viewnior webp-pixbuf-loader
> $ echo $GDK_PIXBUF_MODULE_FILE
>
> but it rebuilds the world. A security-relevant (?) upstream
> introduction of GDK_PIXBUF_MODULE_PATH also would have Guix rebuild
> the world.
>
> Could I, with your agreement, push the viewnior wrapper patch with
> (wrap-program viewnior
> `("GDK_PIXBUF_MODULE_FILE" =
> in the meantime? The majority of users will not know search paths
> anyway perhaps, and viewnior is just one image viewer.
Oh, yeah, for the time being that patch is absolutely fine and it
mirrors what we do with inkscape etc. I was just adding that we can
add escape hatches whenever we want to do a world rebuild.
Cheers
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2025-01-16 7:57 ` Liliana Marie Prikler
@ 2025-01-16 14:36 ` pelzflorian (Florian Pelz)
0 siblings, 0 replies; 19+ messages in thread
From: pelzflorian (Florian Pelz) @ 2025-01-16 14:36 UTC (permalink / raw)
To: 63427-done
Cc: Nathan Dehnel, Josselin Poiret, Liliana Marie Prikler,
Maxim Cournoyer
Pushed as 7aae0e2c159b1612b405a372b18f25fbb58f9d82.
Ah yes inkscape’s wrap-program is similar.
I see Maxim responded do this bug here because of related bug
<https://bugs.gnu.org/75523> with foreign distros. Perhaps discussion
will go on there.
Regards,
Florian
^ permalink raw reply [flat|nested] 19+ messages in thread
* bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.)
2025-01-15 15:07 ` Liliana Marie Prikler
2025-01-16 7:50 ` pelzflorian (Florian Pelz)
@ 2025-01-17 3:18 ` Maxim Cournoyer
1 sibling, 0 replies; 19+ messages in thread
From: Maxim Cournoyer @ 2025-01-17 3:18 UTC (permalink / raw)
To: Liliana Marie Prikler
Cc: Nathan Dehnel, Josselin Poiret, pelzflorian (Florian Pelz), 63427
Hi!
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
[...]
> I've attached a patch that allows us to use
> "set if unspecified" semantics – not really sure how meaningful those
> are – but perhaps we would need a GUIX_-prefixed environment variable
> once again. Barring an upstream change from GDK_PIXBUF_MODULE_FILE to
> GDK_PIXBUF_MODULE_PATH anyway.
>
> WDYT?
>
> diff --git a/guix/build/utils.scm b/guix/build/utils.scm
> index 94714bf397..d48b9112b8 100644
> --- a/guix/build/utils.scm
> +++ b/guix/build/utils.scm
> @@ -1393,6 +1393,9 @@ (define* (wrap-program prog #:key (sh (which "bash")) #:rest vars)
> ((var sep '= rest)
> (format #f "export ~a=\"~a\""
> var (string-join rest sep)))
> + ((var sep ':- rest)
> + (format #f "export ~a=\"${~a:-~a}\""
> + var var (string-join rest sep)))
> ((var sep 'prefix rest)
> (format #f "export ~a=\"~a${~a:+~a}$~a\""
> var (string-join rest sep) var sep var))
> @@ -1402,6 +1405,9 @@ (define* (wrap-program prog #:key (sh (which "bash")) #:rest vars)
> ((var '= rest)
> (format #f "export ~a=\"~a\""
> var (string-join rest ":")))
> + ((var ':- rest)
> + (format #f "export ~a=\"${~a:-~a}\""
> + var var (string-join rest ":")))
> ((var 'prefix rest)
> (format #f "export ~a=\"~a${~a:+:}$~a\""
> var (string-join rest ":") var var))
> @@ -1470,6 +1476,8 @@ (define wrap-script
> (match-lambda
> ((var sep '= rest)
> `(setenv ,var ,(string-join rest sep)))
> + ((var sep ':- rest)
> + `(unless (getenv ,var) (setenv ,var ,(string-join rest sep))))
> ((var sep 'prefix rest)
> `(let ((current (getenv ,var)))
> (setenv ,var (if current
> @@ -1484,6 +1492,8 @@ (define wrap-script
> ,(string-join rest sep)))))
> ((var '= rest)
> `(setenv ,var ,(string-join rest ":")))
> + ((var ':- rest)
> + `(unless (getenv ,var) (setenv ,var ,(string-join rest ":"))))
> ((var 'prefix rest)
> `(let ((current (getenv ,var)))
> (setenv ,var (if current
I like it! It's something I've wanted in the past. Perhaps you could
submit it as its own thing, referencing this issue in the commit message
perhaps.
Longer term, we probably work on an upstream true PATH-like solution,
but in the meantime this would be useful to have here, and probably
useful for other single-entry environment variables.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2025-01-17 3:20 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10 18:50 bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Nathan Dehnel
2023-05-10 22:24 ` bug#63427: Sharlatan Hellseher
2023-05-11 8:05 ` bug#63427: gdk-pixbuf unable to recognize image formats (JPG, PNG, etc.) Josselin Poiret via Bug reports for GNU Guix
2023-05-11 11:04 ` pelzflorian (Florian Pelz)
2023-05-11 19:11 ` Liliana Marie Prikler
2023-05-11 21:22 ` Nathan Dehnel
2023-05-12 9:19 ` pelzflorian (Florian Pelz)
2023-05-12 21:21 ` Nathan Dehnel
2023-05-13 10:49 ` pelzflorian (Florian Pelz)
2023-05-13 13:50 ` Liliana Marie Prikler
2023-05-13 18:38 ` pelzflorian (Florian Pelz)
2023-05-15 5:18 ` Nathan Dehnel
2025-01-15 5:26 ` Maxim Cournoyer
2025-01-15 14:28 ` pelzflorian (Florian Pelz)
2025-01-15 15:07 ` Liliana Marie Prikler
2025-01-16 7:50 ` pelzflorian (Florian Pelz)
2025-01-16 7:57 ` Liliana Marie Prikler
2025-01-16 14:36 ` pelzflorian (Florian Pelz)
2025-01-17 3:18 ` Maxim Cournoyer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).