-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make gdk-pixbuf support avif #102189
Make gdk-pixbuf support avif #102189
Conversation
Build fails as it tries to copy to ${GDK_PIXBUF_MODULEDIR} which is inside the pixbuf package Which directory should it store the loader in? |
Also should libavif be propagated in any way so that it's automatically "just there"? Adding it to gdk-pixbuf causes infinite recursion, since that's a dep of libavif |
This should be detected automatically if a so is linked against it. If this does not happen add it to
You can replace that path with
It should be copied to |
We're building libavif here, we can't write to gdk-pixbuf because that's already built Or are you saying I'm supposed to build the loader in gdk-pixbuf? |
Than I was misunderstanding you. Sorry.
I am not sure. I am not very familiar with this library. A third option would be to add another package and build it there. |
You can change the path using environment variable: PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${placeholder "out"}/${gdk-pixbuf.moduleDir}"; But loading will still be a problem, see the docs in https://github.com/NixOS/nixpkgs/pull/101537/files |
WHAT THE FUCK? That's like counting corona cases based on the weight of the paper. Isn't there some method to merge all the loader caches? |
Sure, the docs mention the module nixpkgs/nixos/modules/services/x11/gdk-pixbuf.nix Lines 11 to 25 in 1ecc5c7
wrapGAppsHook do that and include the cache file in each derivation using wrapGAppsHook .
|
Setting What is the cache then used for in the package itself? Why should we have both? (cache in package and generated cache per nixOS options) |
No, packages using
The environment variable is set in the wrapper to make it more hermetic. Images would not work otherwise on systems that do not set the environment variable globally.
I do not think we should have the NixOS option but some people disagree. Edit: #42562 |
I see gdk-pixbuf modules from the prespective of a nixOS user installing avif support (for ex) globally, so that the file-manager can render thumbnails. Having it per package makes it weird for the edge case that there's multiple cache files in the system. Setting the loaders cache by default with wrapGAppsHook doesn't make too much sense if no extra loaders are included, assuming default ones always loaded. It could be changed so that only packages that have a hard-requirement on specific loaders have their own cache shipped that doesn't interfere with the global configuration. |
Yeah, this is hard.
🤷♀️
We are loading the librsvg wrapper, which all GTK apps need to render window close button and other icons.
🤷♀️ Also with global flag you get delightful bugs like #54278 and #60254. |
@@ -0,0 +1,5 @@ | |||
[Thumbnailer Entry] | |||
TryExec=@bindir@/gdk-pixbuf-thumbnailer | |||
Exec=@bindir@/gdk-pixbuf-thumbnailer -s %s %u %o |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed on IRC, you will need to generate a loaders.cache
file and pass it to the program through environment.
@@ -22,11 +23,14 @@ stdenv.mkDerivation rec { | |||
|
|||
# reco: encode libaom slowest but best, decode dav1d fastest | |||
|
|||
PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = "${placeholder "gdkPixbufLoader"}/${gdk-pixbuf.moduleDir}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Environment variables typically go down, but this expression is already a bit lopsided.
Co-authored-by: Jan Tojnar <[email protected]>
@mkg20001 ping |
I marked this as stale due to inactivity. → More info |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/webp-support-in-nautilus-and-eog-eye-of-gnome/16158/4 |
I've resurrected this in #244723 |
Motivation for this change
Staying up-to-date with technical progress
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)