{`-`} has joined #nixos-gnome
<jtojnar> mkg20001: I am afraid in the short term the only way forward is fixing wrapGAppsHook to build per-package loaders.cache if there is more than one third-party module
<jtojnar> and adding libavif and libheif to eog https://github.com/NixOS/nixpkgs/issues/87033
mkg20001 has joined #nixos-gnome
<mkg20001> <jtojnar "mkg20001: I am afraid in the sho"> Ok, the loaders problem with different versions is also quite bad, so let's do it per package now
<mkg20001> <jtojnar "and adding libavif and libheif t"> should we do that for nautilus and nemo aswell?
<jtojnar> mkg20001: and in the long term patch gdk-pixbuf to allow multiple cache paths like the other environment variables
<jtojnar> not sure, would probably depend on the closure size
<mkg20001> <jtojnar "not sure, would probably depend "> most people that use nemo/nautilus prob also use eog so not too much increase I think?
<jtojnar> but IIRC, the thumbnailers are not gdk-pixbuf loaders themselves but something else
<jtojnar> it had something to do with gnome-desktop package IIRC
<mkg20001> so what's the magic behind making thumbnails for avif work?
<mkg20001> (what would have to be done)
<mkg20001> about libavif: should I include wrapGAppsHook there or will the apps use it that require libavif?
<jtojnar> looking at nautilus, it adds `${librsvg}/share` to `XDG_DATA_DIRS`
<jtojnar> so that can be done from global environment
<mkg20001> if not then I fixed build to include it in the pixbuf module dir, so that PR could be merged then
<jtojnar> librsvg has share/thumbnailers/librsvg.thumbnailer
<jtojnar> which then gets picked up by gnome-desktop nautilus is linking against
<jtojnar> eog will need the loaders.cache though
<jtojnar> but that can be done separately
<jtojnar> building your PR, it does not look like it contains a thumbnailer
<mkg20001> hrm... is it engough to create a similar file as the rsvg thumbnailer? will gdk pixbuf pick it up automatically and make thumbnails with the loader?
<jtojnar> IIRC the thembnailer needs to be a program
<mkg20001> librsvg just recerences pixbuf
<jtojnar> oh, then it should work, you will only need pass it correct environment variable with the loader
<mkg20001> not sure what to put as mime type
<jtojnar> now I wish we had wrapdesktop, which would wrap the Exec path, store the wrapper in $out/libexec and replaced the Exec path with the path to the wrapper
<jtojnar> archiveteam's got you covered http://fileformats.archiveteam.org/wiki/AVIF
<jtojnar> weirdly they do not have one for heif
<mkg20001> I have avif thumbnailer ready now
<jtojnar> hmm, I wonder if we should keep the loader in the same output, it increases the size by 66%
<mkg20001> you mean splitting it to libavif.loader?
<jtojnar> yup
<jtojnar> not sure if gdk-pixbuf setup hook will pick it up from there though
<mkg20001> where did I mess up?
<jtojnar> need to add it to outputs?
<jtojnar> oh, did not see a scrollbar
<mkg20001> libavif.loader has the same content as .out
<jtojnar> did you look into result-loader/?
<mkg20001> ah yeah...
<mkg20001> should we do .loader or .pixbuf-loader ?
<mkg20001> (would have to be the same for all packages)
<jtojnar> I would say gdk-pixbuf-loaders?
<mkg20001> libavif.gdk-pixbuf-loaders?
<jtojnar> bit verbose but I guess it cannot be helped
<mkg20001> libavif.gdk-pixbuf-loader
<mkg20001> without the s
<mkg20001> going with that
<jtojnar> also the thumbnailer will need something like `Exec=env GDK_PIXBUF_MODULE_FILE=...`
<jtojnar> and you will need to generate the cache file in the libavif like shown in the gdk-pixbuf.nix NixOS module
<mkg20001> /nix/store/q1zjp9grl4w92qalkdqjs2bj5d0pf8ih-stdenv-linux/setup: line 1121: gdk-pixbuf-loader: bad substitution
<mkg20001> it doesn't like the dashes
<jtojnar> hmm, weird
<jtojnar> oh, right bash variables
<jtojnar> gdkPixbufLoader?
<jtojnar> i think we used camel case for some outputs
<jtojnar> yeah, we use installedTests
<mkg20001> <jtojnar "also the thumbnailer will need s"> librsvg doesn't have it
<jtojnar> yeah, because every program that uses thumbnailers has `GDK_PIXBUF_MODULE_FILE` containing librsvg set in a wrapper by wrapGAppsHook
<jtojnar> if we add it to the thumbnailer, it will work independently of the program