From a8e19491ddee91c4885e0c3282c0f6448ad023b6 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 21 Oct 2022 09:51:55 +0200 Subject: [PATCH] gnome.eog: Support WebP files A hack until gdk-pixbuf learns to support multiple cache files. --- pkgs/desktops/gnome/core/eog/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/desktops/gnome/core/eog/default.nix b/pkgs/desktops/gnome/core/eog/default.nix index ccb4d439240f9..e0a943a8e1ca3 100644 --- a/pkgs/desktops/gnome/core/eog/default.nix +++ b/pkgs/desktops/gnome/core/eog/default.nix @@ -22,6 +22,7 @@ , shared-mime-info , wrapGAppsHook , librsvg +, webp-pixbuf-loader , libexif , gobject-introspection , gi-docgen @@ -78,6 +79,17 @@ stdenv.mkDerivation rec { "-Dgtk_doc=true" ]; + postInstall = '' + # Pull in WebP support for gnome-backgrounds. + # In postInstall to run before gappsWrapperArgsHook. + export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE { + extraLoaders = [ + librsvg + webp-pixbuf-loader + ]; + }}" + ''; + preFixup = '' gappsWrapperArgs+=( # Thumbnailers