Skip to content

Commit

Permalink
xfce.tumbler, xfce.ristretto: Add HEIF support (NixOS#372912)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobby285271 authored Jan 11, 2025
2 parents 6fba2ab + b320fc9 commit 376250f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 17 deletions.
4 changes: 3 additions & 1 deletion pkgs/desktops/xfce/applications/ristretto/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
glib,
gnome,
libexif,
libheif,
libjxl,
librsvg,
libxfce4ui,
Expand All @@ -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
Expand Down
43 changes: 27 additions & 16 deletions pkgs/desktops/xfce/core/tumbler/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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; {
Expand Down

0 comments on commit 376250f

Please sign in to comment.