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>
Add this hook to checkPhase to allow for running MPI application in
the sandbox. It detects the MPI implementations and sets the respective
environment variables.
also updates nixdoc to 2.3.0. the nixdoc update is not a separate commit
because that would leave the manual build broken for one commit,
potentially breaking bisects and rebases.