xfce.tumbler, xfce.ristretto: enable JXL and WebP support (#340472)

This commit is contained in:
Bobby Rong 2024-09-09 00:28:14 +08:00 committed by GitHub
commit bcae91b901
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 1 deletions

View File

@ -2,9 +2,13 @@
, mkXfceDerivation
, gtk3
, glib
, gnome
, libexif
, libjxl
, librsvg
, libxfce4ui
, libxfce4util
, webp-pixbuf-loader
, xfconf
}:
@ -27,6 +31,18 @@ mkXfceDerivation {
env.NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
postInstall = ''
# Pull in JXL and WebP support for ristretto.
# In postInstall to run before gappsWrapperArgsHook.
export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
extraLoaders = [
libjxl
librsvg
webp-pixbuf-loader
];
}}"
'';
meta = with lib; {
description = "Fast and lightweight picture-viewer for the Xfce desktop environment";
mainProgram = "ristretto";

View File

@ -6,6 +6,8 @@
, freetype
, libgepub
, libgsf
, libjxl
, librsvg
, poppler
, gst_all_1
, webp-pixbuf-loader
@ -35,7 +37,8 @@ mkXfceDerivation {
preFixup = ''
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${webp-pixbuf-loader}/share"
# Thumbnailers
--prefix XDG_DATA_DIRS : "${lib.makeSearchPath "share" [ libjxl librsvg webp-pixbuf-loader ]}"
)
'';