23 stdenv.mkDerivation (finalAttrs: {
28 url = "mirror://gnome/sources/loupe/${lib.versions.major finalAttrs.version}/loupe-${finalAttrs.version}.tar.xz";
29 hash = "sha256-OhWj+c+PiJp+ZC45AimfeSGKkAHAjFY3TgWRT/71qzA=";
33 # Fix paths in glycin library
34 glycin-loaders.passthru.glycinPathsPatch
59 # Replace hash of file we patch in vendored glycin.
61 --arg hash "$(sha256sum vendor/glycin/src/sandbox.rs | cut -d' ' -f 1)" \
62 '.files."src/sandbox.rs" = $hash' \
63 vendor/glycin/.cargo-checksum.json \
64 | sponge vendor/glycin/.cargo-checksum.json
68 # Needed for the glycin crate to find loaders.
69 # https://gitlab.gnome.org/sophie-h/glycin/-/blob/0.1.beta.2/glycin/src/config.rs#L44
71 --prefix XDG_DATA_DIRS : "${glycin-loaders}/share"
75 passthru.updateScript = gnome.updateScript {
76 packageName = "loupe";
80 homepage = "https://gitlab.gnome.org/GNOME/loupe";
81 changelog = "https://gitlab.gnome.org/GNOME/loupe/-/blob/${finalAttrs.version}/NEWS?ref_type=tags";
82 description = "Simple image viewer application written with GTK4 and Rust";
83 license = licenses.gpl3Plus;
84 maintainers = with maintainers; [ jk ] ++ teams.gnome.members;
85 platforms = platforms.unix;
86 mainProgram = "loupe";