From 7e657b9596ddf4ce891f2870c177b7bdb6767001 Mon Sep 17 00:00:00 2001 From: zzzsyyy Date: Fri, 24 Nov 2023 13:33:02 +0800 Subject: [PATCH 1/2] gnome: add `jxl` thumbnails and wallpapers support --- pkgs/desktops/gnome/core/gnome-control-center/default.nix | 4 +++- pkgs/desktops/gnome/core/gnome-shell/default.nix | 4 +++- pkgs/desktops/gnome/core/nautilus/default.nix | 2 ++ .../libraries/xdg-desktop-portal-gnome/default.nix | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/desktops/gnome/core/gnome-control-center/default.nix b/pkgs/desktops/gnome/core/gnome-control-center/default.nix index 2042eede7c113..48566ba66945c 100644 --- a/pkgs/desktops/gnome/core/gnome-control-center/default.nix +++ b/pkgs/desktops/gnome/core/gnome-control-center/default.nix @@ -31,6 +31,7 @@ , libgudev , libadwaita , libkrb5 +, libjxl , libpulseaudio , libpwquality , librsvg @@ -173,10 +174,11 @@ stdenv.mkDerivation (finalAttrs: { ''; postInstall = '' - # Pull in WebP support for gnome-backgrounds. + # Pull in WebP and JXL support for gnome-backgrounds. # In postInstall to run before gappsWrapperArgsHook. export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE { extraLoaders = [ + libjxl librsvg webp-pixbuf-loader ]; diff --git a/pkgs/desktops/gnome/core/gnome-shell/default.nix b/pkgs/desktops/gnome/core/gnome-shell/default.nix index aa74bec266962..3a7da11739773 100644 --- a/pkgs/desktops/gnome/core/gnome-shell/default.nix +++ b/pkgs/desktops/gnome/core/gnome-shell/default.nix @@ -19,6 +19,7 @@ , unzip , shared-mime-info , libgweather +, libjxl , librsvg , webp-pixbuf-loader , geoclue2 @@ -188,10 +189,11 @@ stdenv.mkDerivation (finalAttrs: { ''; postInstall = '' - # Pull in WebP support for gnome-backgrounds. + # Pull in WebP and JXL support for gnome-backgrounds. # In postInstall to run before gappsWrapperArgsHook. export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE { extraLoaders = [ + libjxl librsvg webp-pixbuf-loader ]; diff --git a/pkgs/desktops/gnome/core/nautilus/default.nix b/pkgs/desktops/gnome/core/nautilus/default.nix index 7e2d442493768..9279d967ccbff 100644 --- a/pkgs/desktops/gnome/core/nautilus/default.nix +++ b/pkgs/desktops/gnome/core/nautilus/default.nix @@ -19,6 +19,7 @@ , shared-mime-info , libnotify , libexif +, libjxl , libseccomp , librsvg , webp-pixbuf-loader @@ -106,6 +107,7 @@ stdenv.mkDerivation (finalAttrs: { gappsWrapperArgs+=( # Thumbnailers --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" + --prefix XDG_DATA_DIRS : "${libjxl}/share" --prefix XDG_DATA_DIRS : "${librsvg}/share" --prefix XDG_DATA_DIRS : "${webp-pixbuf-loader}/share" --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" diff --git a/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix b/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix index 11f598b6544b1..966109fa00864 100644 --- a/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal-gnome/default.nix @@ -14,6 +14,7 @@ , xdg-desktop-portal , wayland , gnome +, libjxl , librsvg , webp-pixbuf-loader }: @@ -50,10 +51,11 @@ stdenv.mkDerivation rec { ]; postInstall = '' - # Pull in WebP support for gnome-backgrounds. + # Pull in WebP and JXL support for gnome-backgrounds. # In postInstall to run before gappsWrapperArgsHook. export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE { extraLoaders = [ + libjxl librsvg webp-pixbuf-loader ]; From 2f6d5ffa69ec9c5ad007c65863714d77349f0cf8 Mon Sep 17 00:00:00 2001 From: zzzsyyy Date: Fri, 24 Nov 2023 13:34:39 +0800 Subject: [PATCH 2/2] eog: add `jxl` support --- pkgs/desktops/gnome/core/eog/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome/core/eog/default.nix b/pkgs/desktops/gnome/core/eog/default.nix index 6790c764a82d0..095845b8acc1b 100644 --- a/pkgs/desktops/gnome/core/eog/default.nix +++ b/pkgs/desktops/gnome/core/eog/default.nix @@ -21,6 +21,7 @@ , exempi , shared-mime-info , wrapGAppsHook +, libjxl , librsvg , webp-pixbuf-loader , libheif @@ -81,10 +82,11 @@ stdenv.mkDerivation rec { ]; postInstall = '' - # Pull in WebP support for gnome-backgrounds. + # Pull in WebP and JXL support for gnome-backgrounds. # In postInstall to run before gappsWrapperArgsHook. export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE { extraLoaders = [ + libjxl librsvg webp-pixbuf-loader libheif.out @@ -96,6 +98,7 @@ stdenv.mkDerivation rec { gappsWrapperArgs+=( # Thumbnailers --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share" + --prefix XDG_DATA_DIRS : "${libjxl}/share" --prefix XDG_DATA_DIRS : "${librsvg}/share" --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" )