From 8d57ba244cfb1488db609ed91cb6226c490bc89f Mon Sep 17 00:00:00 2001 From: Maxine Aubrey Date: Sun, 3 Mar 2024 13:42:04 +0100 Subject: [PATCH] =?UTF-8?q?glycin-loaders:=200.1.2=20=E2=86=92=201.0.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/sophie-h/glycin/-/compare/0.1.2...1.0.1 Co-Authored-By: Bobby Rong Changelog-Reviewed-By: Maxine Aubrey --- .../gl/glycin-loaders/fix-glycin-paths.patch | 35 ++++++++++++------- pkgs/by-name/gl/glycin-loaders/package.nix | 10 ++++-- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/gl/glycin-loaders/fix-glycin-paths.patch b/pkgs/by-name/gl/glycin-loaders/fix-glycin-paths.patch index 87a6e4cab176..f05edf96a72a 100644 --- a/pkgs/by-name/gl/glycin-loaders/fix-glycin-paths.patch +++ b/pkgs/by-name/gl/glycin-loaders/fix-glycin-paths.patch @@ -1,13 +1,24 @@ -diff --git a/vendor/glycin/src/dbus.rs b/vendor/glycin/src/dbus.rs -index aa5a876..4f37420 100644 ---- a/vendor/glycin/src/dbus.rs -+++ b/vendor/glycin/src/dbus.rs -@@ -43,7 +43,7 @@ impl<'a> DecoderProcess<'a> { +diff --git a/vendor/glycin/src/sandbox.rs b/vendor/glycin/src/sandbox.rs +index 7d00b36..aa70dc7 100644 +--- a/vendor/glycin/src/sandbox.rs ++++ b/vendor/glycin/src/sandbox.rs +@@ -165,7 +165,7 @@ impl Sandbox { - let (bin, args, final_arg) = match sandbox_mechanism { - SandboxMechanism::Bwrap => ( -- "bwrap".into(), -+ "@bwrap@".into(), - vec![ - "--unshare-all", - "--die-with-parent", + args.push(self.command); + +- ("bwrap".into(), args, Some(seccomp_memfd)) ++ ("@bwrap@".into(), args, Some(seccomp_memfd)) + } + SandboxMechanism::FlatpakSpawn => { + let memory_limit = Self::memory_limit(); +@@ -233,8 +233,8 @@ impl Sandbox { + "/", + // Make /usr available as read only + "--ro-bind", +- "/usr", +- "/usr", ++ "/nix/store", ++ "/nix/store", + // Make tmpfs dev available + "--dev", + "/dev", diff --git a/pkgs/by-name/gl/glycin-loaders/package.nix b/pkgs/by-name/gl/glycin-loaders/package.nix index 6509f4c66e2f..7804acd778f7 100644 --- a/pkgs/by-name/gl/glycin-loaders/package.nix +++ b/pkgs/by-name/gl/glycin-loaders/package.nix @@ -9,20 +9,23 @@ , ninja , pkg-config , rustc +, rustPlatform , gtk4 , cairo , libheif , libxml2 +, libseccomp +, libjxl , gnome }: stdenv.mkDerivation (finalAttrs: { pname = "glycin-loaders"; - version = "0.1.2"; + version = "1.0.1"; src = fetchurl { url = "mirror://gnome/sources/glycin-loaders/${lib.versions.majorMinor finalAttrs.version}/glycin-loaders-${finalAttrs.version}.tar.xz"; - hash = "sha256-x2wBklq9BwF0WJzLkWpEpXOrZbHp1JPxVOQnVkMebdc="; + hash = "sha256-0PAiRi/1VYVuheqUBHRHC7NrN8n/y8umOgP+XpVDcM8="; }; patches = [ @@ -40,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: { ninja pkg-config rustc + rustPlatform.bindgenHook # for libheif-sys ]; buildInputs = [ @@ -47,6 +51,8 @@ stdenv.mkDerivation (finalAttrs: { cairo libheif libxml2 # for librsvg crate + libseccomp + libjxl ]; passthru = {