buildMozillaMach: add patch for rust-cbindgen 0.24 compat

Fixes a regression caused by an update to rust-cbindgen 0.24.x, where
the definition for ROOT_CLIP_CHAIN is now autogenerated and causes the
build to abort with a redefinition error.

https://bugzilla.mozilla.org/show_bug.cgi?id=1773259

Patch by Ollivier Tilloy from Canonical

5622734942
This commit is contained in:
Martin Weinelt 2022-06-08 22:03:27 +02:00
parent 1a3ff178aa
commit 299b9a1b59
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -21,6 +21,7 @@
{ lib
, pkgs
, stdenv
, fetchpatch
# build time
, autoconf
@ -219,6 +220,12 @@ buildStdenv.mkDerivation ({
];
patches = [
(fetchpatch {
# https://bugzilla.mozilla.org/show_bug.cgi?id=1773259
name = "rust-cbindgen-0.24.2-compat.patch";
url = "https://raw.githubusercontent.com/canonical/firefox-snap/5622734942524846fb0eb7108918c8cd8557fde3/patches/fix-ftbfs-newer-cbindgen.patch";
hash = "sha256-+wNZhkDB3HSknPRD4N6cQXY7zMT/DzNXx29jQH0Gb1o=";
})
]
++ lib.optional (lib.versionAtLeast version "86") ./env_var_for_system_dir-ff86.patch
++ lib.optional (lib.versionAtLeast version "90" && lib.versionOlder version "95") ./no-buildconfig-ffx90.patch