From a2a804aaba72eb74ffcd762190a351183c72115d Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 11 Sep 2025 21:09:09 +0000 Subject: [PATCH] =?UTF-8?q?libglycin:=201.2.3=20=E2=86=92=202.0.rc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New ABI version. https://gitlab.gnome.org/GNOME/glycin/-/compare/1.2.3...2.0.rc Keep the old patch for programs that still depend on glycin 2.0 crate. Co-authored-by: Bobby Rong --- .../li/libglycin/fix-glycin-3-paths.patch | 13 ++++++++++ pkgs/by-name/li/libglycin/package.nix | 24 +++++++++++++------ 2 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 pkgs/by-name/li/libglycin/fix-glycin-3-paths.patch diff --git a/pkgs/by-name/li/libglycin/fix-glycin-3-paths.patch b/pkgs/by-name/li/libglycin/fix-glycin-3-paths.patch new file mode 100644 index 000000000000..35b22f06fa36 --- /dev/null +++ b/pkgs/by-name/li/libglycin/fix-glycin-3-paths.patch @@ -0,0 +1,13 @@ +diff --git a/vendor/glycin/src/sandbox.rs b/vendor/glycin/src/sandbox.rs +index 90cd5f6..17a6469 100644 +--- a/vendor/glycin/src/sandbox.rs ++++ b/vendor/glycin/src/sandbox.rs +@@ -251,7 +251,7 @@ impl Sandbox { + } + + async fn bwrap_command(&self, seccomp_memfd: &Memfd) -> Result { +- let mut command = Command::new("bwrap"); ++ let mut command = Command::new("@bwrap@"); + + command.args([ + "--unshare-all", diff --git a/pkgs/by-name/li/libglycin/package.nix b/pkgs/by-name/li/libglycin/package.nix index 74f78c18fa7a..490421355192 100644 --- a/pkgs/by-name/li/libglycin/package.nix +++ b/pkgs/by-name/li/libglycin/package.nix @@ -7,13 +7,14 @@ pkg-config, rustc, cargo, + python3, rustPlatform, vala, gi-docgen, + gobject-introspection, libseccomp, lcms2, gtk4, - gobject-introspection, gnome, replaceVars, bubblewrap, @@ -26,14 +27,14 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "libglycin"; - version = "1.2.3"; + version = "2.0.rc"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "GNOME"; repo = "glycin"; tag = finalAttrs.version; - hash = "sha256-O7Z7kzC0BU7FAF1UZC6LbXVIXPDertsAUNYwHAjkzPI="; + hash = "sha256-eFWHYDWaC8kMYeJZZcoUYyF/TvEqY2iVyjvfMVSRQvA="; }; nativeBuildInputs = [ @@ -42,24 +43,25 @@ stdenv.mkDerivation (finalAttrs: { pkg-config rustc cargo + python3 rustPlatform.cargoSetupHook ] ++ lib.optionals withIntrospection [ vala gi-docgen + gobject-introspection ]; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; - hash = "sha256-g2tsQ6q+sUxn3itu3IgZ5EGtDorPzhaO5B1hlEW5xzs="; + hash = "sha256-i7vuLpAzDp9mPTb3XwiZq70T744m/VVp5he7Cgf1leY="; }; buildInputs = [ libseccomp lcms2 gtk4 - ] - ++ lib.optionals withIntrospection [ gobject-introspection ]; + ]; propagatedBuildInputs = [ libseccomp @@ -68,6 +70,7 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ (lib.mesonBool "glycin-loaders" false) + (lib.mesonBool "glycin-thumbnailer" false) (lib.mesonBool "libglycin" true) (lib.mesonBool "introspection" withIntrospection) (lib.mesonBool "vapi" withIntrospection) @@ -75,7 +78,10 @@ stdenv.mkDerivation (finalAttrs: { ]; postPatch = '' - patch -p2 < ${finalAttrs.passthru.glycinPathsPatch} + patch -p2 < ${finalAttrs.passthru.glycin3PathsPatch} + + patchShebangs \ + build-aux/crates-version.py ''; passthru = { @@ -110,6 +116,10 @@ stdenv.mkDerivation (finalAttrs: { glycinPathsPatch = replaceVars ./fix-glycin-paths.patch { bwrap = "${bubblewrap}/bin/bwrap"; }; + + glycin3PathsPatch = replaceVars ./fix-glycin-3-paths.patch { + bwrap = "${bubblewrap}/bin/bwrap"; + }; }; meta = {