about summary refs log tree commit diff
path: root/pkgs/desktops/xfce/applications/ristretto/default.nix
blob: 0a6a622e777cef59e758ca1132949c92459ce9b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, mkXfceDerivation
, gtk3
, glib
, gnome
, libexif
, libjxl
, librsvg
, libxfce4ui
, libxfce4util
, webp-pixbuf-loader
, xfconf
}:

mkXfceDerivation {
  category = "apps";
  pname = "ristretto";
  version = "0.13.2";
  odd-unstable = false;

  sha256 = "sha256-FKgNKQ2l4FGvEvmppf+RTxMXU6TfsZVFBVii4zr4ASc=";

  buildInputs = [
    glib
    gtk3
    libexif
    libxfce4ui
    libxfce4util
    xfconf
  ];

  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";
    maintainers = with maintainers; [ ] ++ teams.xfce.members;
  };
}