glycin-loaders: replace glycinPathsPatch with setup hook#364572
glycin-loaders: replace glycinPathsPatch with setup hook#364572pluiedev wants to merge 5 commits intoNixOS:masterfrom
glycinPathsPatch with setup hook#364572Conversation
4d52b25 to
461f800
Compare
461f800 to
de3e7a3
Compare
de3e7a3 to
20bdac7
Compare
…`glycin` Rust crate Workaround taken from `loupe` here: https://github.com/NixOS/nixpkgs/blob/e39fe935fc7537bee0440935c12f5c847735a291/pkgs/by-name/lo/loupe/package.nix#L60-L74 May be related to: NixOS#364390 NixOS#364572
20bdac7 to
cc54455
Compare
cc54455 to
94887da
Compare
glycinPathsPatch with patchHook, reformat & cleanup glycinPathsPatch with setup hook
|
After talking with @pluiedev on Discord, I've fixed the merge conflicts, tidied up the hook itself, and made it act more like similar hooks ( Built against Loupe and all seems well 👍 |
94887da to
f21defe
Compare
`glycinPathsPatch` 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/`. The setup hook also consolidates the various checksum patches and additions to `gappsWrapperArgs`, making packages that use glycin much more DRY. Hopefully, new packages using glycin would be able to simply add `glycin-loaders` to their `buildInputs`, and have it work OOTB. Co-authored-by: Seth Flynn <getchoo@tuta.io>
f21defe to
16ab70a
Compare
|
06kellyjac
left a comment
There was a problem hiding this comment.
Looks sensible.
Can we get another rebase to resolve conflicts please. Hopefully it can be merged before another conflict arises!
|
Thank you for the patches and sorry, I somehow missed this. In the meanwhile we have introduced I took the liberty to rebase this change set and split it into more commits as part of introduction of libglycin-gtk4 in #481377 |
|
Superseded by #481377 |
glycinPathsPatchdoesn't work with apps that userustPlatform.cargoSetupHooksince it assumes a setup where snapshots of GNOME sources already contain vendored Rust dependencies undervendor/.patchHookinstead provides a much more flexible approach that uses the$cargoDepsCopyvariable provided bycargoSetupHook, which points to the local, modifiable copy of Cargo dependencies, to patchsrc/sandbox.rsjust likeglycinPathsPatch. If$cargoDepsCopyis not found, then the old behavior is used where Cargo dependencies are assumed to be undervendor/.The
patchHookalso consolidates the various checksum patches and additions togappsWrapperArgs, making packages that use glycin much more DRY. Hopefully, new packages using glycin would be able to simply addglycin-loaders.patchHookto theirnativeBuildInputs, and have it work OOTB.glycin-loadersand its dependents are also reformatted, cleaned up and brought more inline with modern standards and conventions.Closes #364390
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.