From 49d0b992a8fd0793e09fa79138a6ce9f8a551d29 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 11 Jan 2025 19:05:09 +0800 Subject: [PATCH 1/2] xfce.ristretto: Add HEIF support Fixes #372885. --- pkgs/desktops/xfce/applications/ristretto/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/xfce/applications/ristretto/default.nix b/pkgs/desktops/xfce/applications/ristretto/default.nix index bc13fa546489f..44ef452b50250 100644 --- a/pkgs/desktops/xfce/applications/ristretto/default.nix +++ b/pkgs/desktops/xfce/applications/ristretto/default.nix @@ -5,6 +5,7 @@ glib, gnome, libexif, + libheif, libjxl, librsvg, libxfce4ui, @@ -31,11 +32,12 @@ mkXfceDerivation { ]; postInstall = '' - # Pull in JXL and WebP support for ristretto. + # Pull in HEIF, JXL and WebP support for ristretto. # In postInstall to run before gappsWrapperArgsHook. export GDK_PIXBUF_MODULE_FILE="${ gnome._gdkPixbufCacheBuilder_DO_NOT_USE { extraLoaders = [ + libheif.out libjxl librsvg webp-pixbuf-loader From b320fc9b0c521d32a39a8b4dc736053ba0a066c5 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 11 Jan 2025 19:39:22 +0800 Subject: [PATCH 2/2] xfce.tumbler: Add HEIF support --- pkgs/desktops/xfce/core/tumbler/default.nix | 43 +++++++++++++-------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/pkgs/desktops/xfce/core/tumbler/default.nix b/pkgs/desktops/xfce/core/tumbler/default.nix index 98c94858be2b3..764a093516d57 100644 --- a/pkgs/desktops/xfce/core/tumbler/default.nix +++ b/pkgs/desktops/xfce/core/tumbler/default.nix @@ -1,17 +1,19 @@ -{ lib -, mkXfceDerivation -, ffmpegthumbnailer -, gdk-pixbuf -, glib -, freetype -, libgepub -, libgsf -, libjxl -, librsvg -, poppler -, gst_all_1 -, webp-pixbuf-loader -, libxfce4util +{ + lib, + mkXfceDerivation, + ffmpegthumbnailer, + gdk-pixbuf, + glib, + freetype, + libgepub, + libgsf, + libheif, + libjxl, + librsvg, + poppler, + gst_all_1, + webp-pixbuf-loader, + libxfce4util, }: # TODO: add libopenraw @@ -38,13 +40,22 @@ mkXfceDerivation { preFixup = '' gappsWrapperArgs+=( # Thumbnailers - --prefix XDG_DATA_DIRS : "${lib.makeSearchPath "share" [ libjxl librsvg webp-pixbuf-loader ]}" + --prefix XDG_DATA_DIRS : "${ + lib.makeSearchPath "share" [ + libheif.out + libjxl + librsvg + webp-pixbuf-loader + ] + }" + # For heif-thumbnailer in heif.thumbnailer + --prefix PATH : "${lib.makeBinPath [ libheif ]}" ) ''; # WrapGAppsHook won't touch this binary automatically, so we wrap manually. postFixup = '' - wrapProgram $out/lib/tumbler-1/tumblerd "''${gappsWrapperArgs[@]}" + wrapGApp $out/lib/tumbler-1/tumblerd ''; meta = with lib; {