Skip to content

libavif: build gdk-pixbuf loader and thumbnailer#244723

Merged
ncfavier merged 1 commit intoNixOS:stagingfrom
ncfavier:avifgdk
Jul 29, 2023
Merged

libavif: build gdk-pixbuf loader and thumbnailer#244723
ncfavier merged 1 commit intoNixOS:stagingfrom
ncfavier:avifgdk

Conversation

@ncfavier
Copy link
Member

@ncfavier ncfavier commented Jul 21, 2023

Resurrecting #102189

Upstream now ships a .thumbnailer which we just have to patch a little. I mostly followed the approach of webp-pixbuf-loader and added an avif-thumbnailer.

I kept the loader in out rather than a separate output because 1. it doesn't seem to increase the size that much, and 2. doing the latter means that the .thumbnailer also has to live in the loader output (to avoid cyclic references with out), which means it won't work "out of the box".

I also specialised loaders.cache to webp-loaders.cache and avif-loaders.cache to avoid collisions when installing multiple loaders into a profile. I can do librsvg too but it's a bit more of a hassle so I thought I'd ask first.

Tested webp-pixbuf-loader + libavif in my user profile with thunar/tumbler's DesktopThumbnailer enabled; both types of thumbnails are rendered correctly.

Closes #102189

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ncfavier ncfavier requested a review from jtojnar July 21, 2023 21:08
@ncfavier ncfavier mentioned this pull request Jul 21, 2023
10 tasks
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. labels Jul 21, 2023
@ncfavier
Copy link
Member Author

Hmm, looks like libavif is a mass rebuild these days

@ncfavier ncfavier changed the base branch from master to staging July 21, 2023 21:53
@ofborg ofborg bot requested a review from jtojnar July 21, 2023 22:13
@ofborg ofborg bot requested a review from jtojnar July 22, 2023 12:53
AOMediaCodec/libavif#182
AOMediaCodec/libavif#977

Mostly mirrors webp-pixbuf-loader.

Also use prefixed names for `loaders.cache` so that users can install
multiple loaders in a profile without collisions, and move
`bin/webp-thumbnailer` to `libexec/gdk-pixbuf-thumbnailer-webp` (and
similarly for avif).
@ncfavier ncfavier merged commit 72337d1 into NixOS:staging Jul 29, 2023
@ncfavier ncfavier deleted the avifgdk branch July 29, 2023 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants