From 0042d4e701714331a5c714b5675a9b10ae888bbb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 13 Jun 2026 02:05:56 +0200 Subject: [PATCH 1/2] rust-cbindgen: 0.29.3 -> 0.29.4 https://github.com/mozilla/cbindgen/blob/v0.29.4/CHANGES --- pkgs/by-name/ru/rust-cbindgen/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ru/rust-cbindgen/package.nix b/pkgs/by-name/ru/rust-cbindgen/package.nix index 88bb855e800b0..c6e5427f80c2f 100644 --- a/pkgs/by-name/ru/rust-cbindgen/package.nix +++ b/pkgs/by-name/ru/rust-cbindgen/package.nix @@ -14,16 +14,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "rust-cbindgen"; - version = "0.29.3"; + version = "0.29.4"; src = fetchFromGitHub { owner = "mozilla"; repo = "cbindgen"; rev = "v${finalAttrs.version}"; - hash = "sha256-d0rY7Sk37s8HEZlQq9Sbjj1P+DgygD0Yjx8cXlFKEIA="; + hash = "sha256-leeHOwpzXuzg2cTjXehBnCsS+dvU4eIIFtWKeCee20U="; }; - cargoHash = "sha256-UeierkQpfCiB5ES9ZW9hO+0AcI9Ip8qSJ/Nd+I1xrmQ="; + cargoHash = "sha256-f6YoDoiVoh0BVPYHFO1FsdI4OCsF+LY72QaD57StdIQ="; nativeCheckInputs = [ cmake From 1cb1099ea97eefaaaa1833b97f964e4c81fde20c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 30 Jun 2026 03:08:30 +0200 Subject: [PATCH 2/2] buildMozillaMach: backport cbindgen 0.29.4 compat Cherry-picked from 153 to remain compatible with cbindgen 0.29.4. --- .../153-cbindgen-0.29.4-compat.patch | 36 +++++++++++++++++++ .../build-mozilla-mach/default.nix | 5 +++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch diff --git a/pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch b/pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch new file mode 100644 index 0000000000000..84238f025fc6c --- /dev/null +++ b/pkgs/build-support/build-mozilla-mach/153-cbindgen-0.29.4-compat.patch @@ -0,0 +1,36 @@ +commit c4aab1ba6aadd6985fcd271679d2118f094ec876 +Author: Emilio Cobos Álvarez +Date: Tue Jun 9 22:04:44 2026 +0000 + + Bug 2046162 - Remove some redundant pub qualifiers. r=gfx-reviewers,aosmond + + The enum is not public so this doesn't change behavior but a patch I'm + working on in cbindgen gets a bit confused with this. + + Differential Revision: https://phabricator.services.mozilla.com/D305678 + +diff --git a/gfx/wr/webrender/src/texture_cache.rs b/gfx/wr/webrender/src/texture_cache.rs +index e14c26bd3190..77e1f3a312ac 100644 +--- a/gfx/wr/webrender/src/texture_cache.rs ++++ b/gfx/wr/webrender/src/texture_cache.rs +@@ -273,9 +273,9 @@ enum BudgetType { + } + + impl BudgetType { +- pub const COUNT: usize = 7; ++ const COUNT: usize = 7; + +- pub const VALUES: [BudgetType; BudgetType::COUNT] = [ ++ const VALUES: [BudgetType; BudgetType::COUNT] = [ + BudgetType::SharedColor8Linear, + BudgetType::SharedColor8Nearest, + BudgetType::SharedColor8Glyphs, +@@ -285,7 +285,7 @@ impl BudgetType { + BudgetType::Standalone, + ]; + +- pub const PRESSURE_COUNTERS: [usize; BudgetType::COUNT] = [ ++ const PRESSURE_COUNTERS: [usize; BudgetType::COUNT] = [ + profiler::ATLAS_COLOR8_LINEAR_PRESSURE, + profiler::ATLAS_COLOR8_NEAREST_PRESSURE, + profiler::ATLAS_COLOR8_GLYPHS_PRESSURE, diff --git a/pkgs/build-support/build-mozilla-mach/default.nix b/pkgs/build-support/build-mozilla-mach/default.nix index d6fce120abb74..cee18f7439ef0 100644 --- a/pkgs/build-support/build-mozilla-mach/default.nix +++ b/pkgs/build-support/build-mozilla-mach/default.nix @@ -341,6 +341,11 @@ buildStdenv.mkDerivation { # https://bugzilla.mozilla.org/show_bug.cgi?id=1985509 ./140-bindgen-string-view.patch ] + ++ lib.optionals (lib.versionAtLeast version "140" && lib.versionOlder version "140.13") [ + # https://github.com/mozilla/cbindgen/issues/1165 + # https://bugzilla.mozilla.org/show_bug.cgi?id=2046162 + ./153-cbindgen-0.29.4-compat.patch + ] ++ extraPatches; postPatch = ''