tuba: add webp support with webp-pixbuf-loader

Fixes "Tuba-WARNING: Image.vala:68: Failed to download image at
"https://example.com/avatar.webp": Unrecognized image file format"

Useful for Misskey instances using webp avatars by default.

See: https://github.com/GeopJr/Tuba/issues/708
And: https://github.com/NixOS/nixpkgs/issues/321983
This commit is contained in:
Donovan Glover 2024-07-07 17:35:21 -04:00
parent 351d5e9f73
commit 5bd4984cd3
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -13,14 +13,17 @@
, json-glib , json-glib
, glib , glib
, glib-networking , glib-networking
, gnome
, gobject-introspection , gobject-introspection
, gtksourceview5 , gtksourceview5
, libxml2 , libxml2
, libgee , libgee
, librsvg
, libsoup_3 , libsoup_3
, libsecret , libsecret
, libwebp , libwebp
, libspelling , libspelling
, webp-pixbuf-loader
, icu , icu
, gst_all_1 , gst_all_1
, clapper , clapper
@ -86,6 +89,17 @@ stdenv.mkDerivation rec {
updateScript = nix-update-script { }; updateScript = nix-update-script { };
}; };
# Pull in WebP support for avatars from Misskey instances.
# In postInstall to run before gappsWrapperArgsHook.
postInstall = ''
export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
extraLoaders = [
librsvg
webp-pixbuf-loader
];
}}"
'';
meta = { meta = {
description = "Browse the Fediverse"; description = "Browse the Fediverse";
homepage = "https://tuba.geopjr.dev/"; homepage = "https://tuba.geopjr.dev/";