From 2eea5c7f73f2ec6c9cbf8f8997ddfba31d097a0c Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Thu, 9 Apr 2026 20:27:02 -0400 Subject: [PATCH] rubberband: fix build with libc++ 21 --- .../0001-Fix-an-error-with-libcxx-21.patch | 29 +++++++++++++++++++ pkgs/by-name/ru/rubberband/package.nix | 6 ++++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/by-name/ru/rubberband/0001-Fix-an-error-with-libcxx-21.patch diff --git a/pkgs/by-name/ru/rubberband/0001-Fix-an-error-with-libcxx-21.patch b/pkgs/by-name/ru/rubberband/0001-Fix-an-error-with-libcxx-21.patch new file mode 100644 index 000000000000..e70f5e98ae7d --- /dev/null +++ b/pkgs/by-name/ru/rubberband/0001-Fix-an-error-with-libcxx-21.patch @@ -0,0 +1,29 @@ +From 9cb3e66870ae22d87222ee7636e5b6c85c776673 Mon Sep 17 00:00:00 2001 +From: Nicolas PARLANT +Date: Sun, 27 Jul 2025 15:53:17 +0200 +Subject: [PATCH] missing include cstdlib + +Fix an error with libcxx-21 + +>In file included from ../rubberband-4.0.0/src/common/mathmisc.cpp:24: +>../rubberband-4.0.0/src/common/mathmisc.h:58:1: +>error: unknown type name 'size_t'; did you mean 'std::size_t'? + +Signed-off-by: Nicolas PARLANT +--- + src/common/mathmisc.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/common/mathmisc.h b/src/common/mathmisc.h +index d8bcc14d..66f3378c 100644 +--- a/src/common/mathmisc.h ++++ b/src/common/mathmisc.h +@@ -26,6 +26,8 @@ + + #include "sysutils.h" + ++#include ++ + #ifndef M_PI + #define M_PI 3.14159265358979323846 + #endif // M_PI diff --git a/pkgs/by-name/ru/rubberband/package.nix b/pkgs/by-name/ru/rubberband/package.nix index a36259479998..eaae08daf40c 100644 --- a/pkgs/by-name/ru/rubberband/package.nix +++ b/pkgs/by-name/ru/rubberband/package.nix @@ -23,6 +23,12 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-rwUDE+5jvBizWy4GTl3OBbJ2qvbRqiuKgs7R/i+AKOk="; }; + patches = [ + # Fix missing size_t definition when building with libc++ 21. + # Source: https://github.com/breakfastquay/rubberband/pull/126 + ./0001-Fix-an-error-with-libcxx-21.patch + ]; + nativeBuildInputs = [ pkg-config meson