From e8d5fd6f2d08bdb1d823ce01990981e6d5395b07 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 30 Sep 2026 07:24:54 -0400 Subject: [PATCH] graphene-hardened-malloc: fix build with GCC 16 --- pkgs/by-name/gr/graphene-hardened-malloc/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/by-name/gr/graphene-hardened-malloc/package.nix b/pkgs/by-name/gr/graphene-hardened-malloc/package.nix index be0fece666ec..b77ea921ed5f 100644 --- a/pkgs/by-name/gr/graphene-hardened-malloc/package.nix +++ b/pkgs/by-name/gr/graphene-hardened-malloc/package.nix @@ -1,5 +1,6 @@ { fetchFromGitHub, + fetchpatch, lib, makeWrapper, nix-update-script, @@ -20,6 +21,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-QUGDJyTnD5MuBUMlc4PZOZSAfevVUB6QbncVyXIAgb8="; }; + patches = [ + # GCC 16 moved `std::__throw_bad_alloc` to `` + (fetchpatch { + url = "https://github.com/GrapheneOS/hardened_malloc/commit/04a25bd141efcd2c0d29ef7d868b205a844b3ad2.patch"; + hash = "sha256-+FBjnGnjs1nyN/zu0Gf0bIv7RHEDscevDsFkvb1/A20="; + }) + ]; + nativeCheckInputs = [ python3 ]; # these tests cover use as a build-time-linked library checkTarget = "test";