1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00
Files
guix/gnu/packages/patches/glycin-sandbox-Adapt-bwrap-invocation.patch
Noé Lopez 08a9f8941f gnu: Add glycin-loaders.
* gnu/packages/gnome.scm (glycin-loaders): New variable.
* gnu/packages/patches/glycin-sandbox-Adapt-bwrap-invocation.patch:
New file.
* gnu/packages/rust-crates.scm (lookup-cargo-inputs)[glycin]:
New entry.

Change-Id: I16dfb2678381d69212b3eea4e4aa5f896208cc12
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2026-03-06 14:53:14 +01:00

60 lines
1.9 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
From 628066901e473c185da6f0aaf26ee826d2b4bd31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?No=C3=A9=20Lopez?= <noelopez@free.fr>
Date: Tue, 14 Oct 2025 22:20:42 +0200
Subject: [PATCH] glycin/sandbox: Adapt bwrap invocation to Guix
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Firstly, we use @bwrap@ so that we can substitute it with an absolute
path to the bwrap binary.
Next, we change the /usr bind to be optional since there can be no
/usr in a Guix system (especially in the build daemon).
Lastly, we add /gnu/store. I dont think this is needed, but it is the
upstream authors wish with adding /nix/store. See also
<https://gitlab.gnome.org/GNOME/glycin/-/issues/224>.
Upstream-status: Not applicable.
---
glycin/src/sandbox.rs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/glycin/src/sandbox.rs b/glycin/src/sandbox.rs
index 916a8f0..350ece3 100644
--- a/glycin/src/sandbox.rs
+++ b/glycin/src/sandbox.rs
@@ -271,7 +271,7 @@ impl Sandbox {
}
async fn bwrap_command(&self, seccomp_memfd: &Memfd) -> Result<Command, Error> {
- let mut command = Command::new("bwrap");
+ let mut command = Command::new("@bwrap@");
command.args([
"--unshare-all",
@@ -280,7 +280,7 @@ impl Sandbox {
"--chdir",
"/",
// Make /usr available as read only
- "--ro-bind",
+ "--ro-bind-try",
"/usr",
"/usr",
// Make tmpfs dev available
@@ -294,6 +294,10 @@ impl Sandbox {
"--ro-bind-try",
"/nix/store",
"/nix/store",
+ // Add /gnu/store on systems with Guix
+ "--ro-bind-try",
+ "@storedir@",
+ "@storedir@",
// Create a fake HOME for glib to not throw warnings
"--tmpfs",
"/tmp-home",
--
2.51.0