From 4965a358b19647194580c09da7fbf1ae3d017217 Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Tue, 29 Jul 2025 06:00:53 -0600 Subject: [PATCH] audacity: unbreak --- pkgs/by-name/au/audacity/package.nix | 5 +++++ pkgs/by-name/au/audacity/rapidjson.patch | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/by-name/au/audacity/rapidjson.patch diff --git a/pkgs/by-name/au/audacity/package.nix b/pkgs/by-name/au/audacity/package.nix index 563324bd94c4..60a0ce057c2a 100644 --- a/pkgs/by-name/au/audacity/package.nix +++ b/pkgs/by-name/au/audacity/package.nix @@ -70,6 +70,11 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-kESKpIke9Xi4A55i3mUu1JkDjp8voBJBixiAK8pUkKA="; }; + patches = [ + # Introduced by https://github.com/Tencent/rapidjson/commit/b1c0c2843fcb2aca9ecc650fc035c57ffc13697c#diff-2f1bcf2729ff7c408adb0c2cc2cfa01602bd5646b05b3e4bc7e46b606035d249R21 + ./rapidjson.patch + ]; + postPatch = '' mkdir src/private substituteInPlace scripts/build/macOS/fix_bundle.py \ diff --git a/pkgs/by-name/au/audacity/rapidjson.patch b/pkgs/by-name/au/audacity/rapidjson.patch new file mode 100644 index 000000000000..66a64088e014 --- /dev/null +++ b/pkgs/by-name/au/audacity/rapidjson.patch @@ -0,0 +1,18 @@ +diff --git a/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake b/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake +index ba95962..66a96a8 100644 +--- a/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake ++++ b/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake +@@ -2,8 +2,11 @@ + + if(NOT ${_OPT}use_rapidjson STREQUAL "off") + if(NOT TARGET rapidjson::rapidjson) +- if(TARGET rapidjson) +- add_library( rapidjson::rapidjson ALIAS rapidjson ) ++ if(TARGET RapidJSON) ++ if(NOT TARGET rapidjson) ++ add_library(rapidjson ALIAS RapidJSON) ++ endif() ++ add_library( rapidjson::rapidjson ALIAS RapidJSON ) + else() + # At least on Arch RapidJSONConfig.cmake does not define a target at all + # so we have to do it ourselves