From 486f248ce46043cd4c76e60012c83a14f310784e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 16 Sep 2021 23:16:02 +0200 Subject: [PATCH] catch: fix build w/glibc-2.34 The issue was that `SIGSTKSZ` isn't an actual const anymore and thus can't be used to define sizes of static variables such as static char foo[SIGSTKSZ]; since this results in compiler errors such as error: array bound is not an integer constant before ']' token Fedora worked around this by hard-coding the value in `catch`. Since this is mainly a testing-framework and there's no other fix for v1 - we should eventually remove it entirely in favor of v2 anyways - I guess this is a good-enough fix. Failing Hydra build: https://hydra.nixos.org/build/152455108 --- pkgs/development/libraries/catch/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/catch/default.nix b/pkgs/development/libraries/catch/default.nix index c89fbd477c96..c4d64a0f4787 100644 --- a/pkgs/development/libraries/catch/default.nix +++ b/pkgs/development/libraries/catch/default.nix @@ -20,6 +20,12 @@ stdenv.mkDerivation rec { url = "https://github.com/catchorg/Catch2/commit/bb6d08323f23a39eb65dd86671e68f4f5d3f2d6c.patch"; sha256 = "1vhbzx84nrhhf9zlbl6h5zmg3r5w5v833ihlswsysb9wp2i4isc5"; }) + + # Fix glibc-2.34 build + (fetchpatch { + url = "https://src.fedoraproject.org/rpms/catch1/raw/23276476148a657e7a45ade547f858cbf965a33a/f/catch1-sigstksz.patch"; + sha256 = "sha256-XSsI3iDEZCUSbozlYWC0y/LZ7qr/5zwACpn1jHKD0yU="; + }) ]; doCheck = true;