libglycin-gtk4: init (split out of libglycin)#481377
Merged
jtojnar merged 23 commits intoNixOS:masterfrom Feb 4, 2026
Merged
Conversation
13 tasks
Most likely copy-pasta.
This appears to have been accidentally introduced in 9a59118.
We are going to switch to a setup hook and this is the last user of the glycin 2 patch. It probably does not work anyway because it uses glycin 3 loaders.
Avoid pulling in headers, and prepare for setup hook.
Glycin rust library searches `bwrap` on path. This would require every reverse dependency to add `bubblewrap` to its `PATH`, which would be quite annoying to ensure. Especially when libraries start using glycin. We provide `passthru.glycinPathsPatch` to perform source-level hardcoding but that doesn't work with apps that use `rustPlatform.cargoSetupHook` since it assumes a setup where snapshots of GNOME sources already contain vendored Rust dependencies under `vendor/`. The setup hook instead provides a much more flexible approach that uses the `$cargoDepsCopy` variable provided by `cargoSetupHook`, which points to the local, modifiable copy of Cargo dependencies, to patch `src/sandbox.rs` just like `glycinPathsPatch`. If `$cargoDepsCopy` is not found, then the old behavior is used where Cargo dependencies are assumed to be under `vendor/`. Additionally, the patch requires modifying `Cargo.lock` when using `rustPlatform.fetchCargoVendor`. The setup hook fixes that as well. Rust programs just need to add `libglycin.patchVendorHook` and it should take care of this. Co-authored-by: Seth Flynn <getchoo@tuta.io> Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
e6bb52f to
093bf3e
Compare
6d9f428 to
ab2b73d
Compare
These should be updated in lockstep. Also remove update script – we will consider libglycin the main package.
fontconfig is propagated by cairo propagated by gtk4 but it is a direct dependency of libglycin. Similarly with glib. Though the pkg-config `Requires` are overly broad – only glib is required by the headers. This should be addressed upstream.
When we try to run `glycin-loaders` tests in Nix build sandbox, they would fail because the build sandbox lacks `/usr`. Let’s update our setup hook to patch the crate to have mounting `/usr` fail gracefully. This was proposed upstream and rejected: https://gitlab.gnome.org/GNOME/glycin/-/merge_requests/348
gtk4 is only needed for tests, let’s not pull it in unless tests are actually run. And make tests meson feature conditional on `doCheck`. Keep not running tests by default since we will want to add glycin to gdk-pixbuf, which is a dependency of gtk4. Co-authored-by: Max <max@privatevoid.net>
In preparation for gdk-pixbuf switching to glycin.
for loaders discovery.
for loaders discovery. Also drop `bubblewrap`, which is already being hardcoded in `libglycin` package since bb77c25.
for loaders discovery.
for loaders discovery.
for loaders discovery.
ab2b73d to
8f65f52
Compare
austinbutler
approved these changes
Jan 20, 2026
Member
austinbutler
left a comment
There was a problem hiding this comment.
Approved for my own package.
Member
There was a problem hiding this comment.
Everything seems to work the same without glycin-loaders.
Contributor
|
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/gnome-release-strategy-for-nixos-stable/74887/4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In preparation for gdk-pixbuf switching to glycin.
This contains changes from #364572.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.XDG_DATA_DIRS.