Unverified Commit e2210d16 authored by Bobby Rong's avatar Bobby Rong
Browse files

xfce.ristretto: enable JXL and WebP support

parent 5075ab87
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -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";