From f18a27f91b9045ce211e9907358df431fa920b41 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 7 Nov 2025 22:20:40 -0500 Subject: [PATCH 1/5] wxwidgets_3_3: fix darwin build failure --- pkgs/by-name/wx/wxwidgets_3_3/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/wx/wxwidgets_3_3/package.nix b/pkgs/by-name/wx/wxwidgets_3_3/package.nix index 9f16a12edbb5..7a8236a7792f 100644 --- a/pkgs/by-name/wx/wxwidgets_3_3/package.nix +++ b/pkgs/by-name/wx/wxwidgets_3_3/package.nix @@ -86,6 +86,7 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optional withMesa "--with-opengl" ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "--with-macosx-version-min=${stdenv.hostPlatform.darwinMinVersion}" "--with-osx_cocoa" "--with-libiconv" "--with-urlsession" # for wxWebRequest From 2df0b9e7281fd0385f2c8d28ed74bf58064cdacb Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 7 Nov 2025 22:20:49 -0500 Subject: [PATCH 2/5] wxGTK32: fix darwin build failure --- pkgs/by-name/wx/wxGTK32/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/wx/wxGTK32/package.nix b/pkgs/by-name/wx/wxGTK32/package.nix index 80a179152dfb..ef47cfef5bab 100644 --- a/pkgs/by-name/wx/wxGTK32/package.nix +++ b/pkgs/by-name/wx/wxGTK32/package.nix @@ -101,6 +101,7 @@ stdenv.mkDerivation rec { ++ lib.optional unicode "--enable-unicode" ++ lib.optional withMesa "--with-opengl" ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "--with-macosx-version-min=${stdenv.hostPlatform.darwinMinVersion}" "--with-osx_cocoa" "--with-libiconv" "--with-urlsession" # for wxWebRequest From 52a618d7bb281f32cc877de61982bd0a26da1ba6 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 7 Nov 2025 22:25:19 -0500 Subject: [PATCH 3/5] wxGTK31: fix darwin build failure --- pkgs/by-name/wx/wxGTK31/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/wx/wxGTK31/package.nix b/pkgs/by-name/wx/wxGTK31/package.nix index e474550d6223..b9176a248730 100644 --- a/pkgs/by-name/wx/wxGTK31/package.nix +++ b/pkgs/by-name/wx/wxGTK31/package.nix @@ -80,6 +80,7 @@ stdenv.mkDerivation rec { ++ lib.optional withPrivateFonts "--enable-privatefonts" ++ lib.optional withMesa "--with-opengl" ++ lib.optionals stdenv.hostPlatform.isDarwin [ + "--with-macosx-version-min=${stdenv.hostPlatform.darwinMinVersion}" "--with-osx_cocoa" "--with-libiconv" ] From cd1230cbb4988b4215a1827671124aa82ab899cd Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 8 Nov 2025 16:56:03 -0500 Subject: [PATCH 4/5] audacity: fix darwin build failure We link binaries with /usr/lib/libSystem.B.dylib but patchPhase was patching upstream fix_bundle script so that it was overriding references to it with @loader_path/../Frameworks, breaking the build. --- pkgs/by-name/au/audacity/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/au/audacity/package.nix b/pkgs/by-name/au/audacity/package.nix index 3f4110c6c7f7..919298baf10e 100644 --- a/pkgs/by-name/au/audacity/package.nix +++ b/pkgs/by-name/au/audacity/package.nix @@ -78,7 +78,7 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' mkdir src/private substituteInPlace scripts/build/macOS/fix_bundle.py \ - --replace-fail "path.startswith('/usr/lib/')" "path.startswith('${builtins.storeDir}')" + --replace-fail "path.startswith('/usr/lib/')" "path.startswith('/usr/lib/') or path.startswith('${builtins.storeDir}')" '' + lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace libraries/lib-files/FileNames.cpp \ From 9e33d07cfadde9b64466a54b27e31db4bc4f7ff1 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 8 Nov 2025 19:21:41 -0500 Subject: [PATCH 5/5] spek: fix build failure due to ffmpeg=8 --- pkgs/by-name/sp/spek/ffmpeg8-compat.patch | 74 +++++++++++++++++++++++ pkgs/by-name/sp/spek/package.nix | 2 + 2 files changed, 76 insertions(+) create mode 100644 pkgs/by-name/sp/spek/ffmpeg8-compat.patch diff --git a/pkgs/by-name/sp/spek/ffmpeg8-compat.patch b/pkgs/by-name/sp/spek/ffmpeg8-compat.patch new file mode 100644 index 000000000000..59d6dd608854 --- /dev/null +++ b/pkgs/by-name/sp/spek/ffmpeg8-compat.patch @@ -0,0 +1,74 @@ +From df8402575f1550d79c751051e9006fd3b7fa0fe0 Mon Sep 17 00:00:00 2001 +From: Hannes Braun +Date: Thu, 9 Oct 2025 20:28:34 +0200 +Subject: [PATCH] Fix compatibility with FFmpeg 8 + +--- + src/spek-fft.cc | 25 ++++++++++++++++--------- + 1 file changed, 16 insertions(+), 9 deletions(-) + +diff --git a/src/spek-fft.cc b/src/spek-fft.cc +index 3105213f..00d4fa5c 100644 +--- a/src/spek-fft.cc ++++ b/src/spek-fft.cc +@@ -2,7 +2,7 @@ + + #define __STDC_CONSTANT_MACROS + extern "C" { +-#include ++#include + } + + #include "spek-fft.h" +@@ -16,7 +16,10 @@ class FFTPlanImpl : public FFTPlan + void execute() override; + + private: +- struct RDFTContext *cx; ++ struct AVTXContext *cx; ++ av_tx_fn tx; ++ float* tmp; ++ const int len; + }; + + std::unique_ptr FFT::create(int nbits) +@@ -24,27 +27,31 @@ std::unique_ptr FFT::create(int nbits) + return std::unique_ptr(new FFTPlanImpl(nbits)); + } + +-FFTPlanImpl::FFTPlanImpl(int nbits) : FFTPlan(nbits), cx(av_rdft_init(nbits, DFT_R2C)) ++FFTPlanImpl::FFTPlanImpl(int nbits) : FFTPlan(nbits), len(1 << nbits) + { ++ const float scale = 1.0; ++ av_tx_init(&this->cx, &this->tx, AV_TX_FLOAT_RDFT, 0, this->len, &scale, 0); ++ this->tmp = (float*) av_malloc((this->len + 2) * sizeof(float)); + } + + FFTPlanImpl::~FFTPlanImpl() + { +- av_rdft_end(this->cx); ++ av_tx_uninit(&this->cx); ++ av_freep(&this->tmp); + } + + void FFTPlanImpl::execute() + { +- av_rdft_calc(this->cx, this->get_input()); ++ this->tx(this->cx, this->tmp, this->get_input(), sizeof(AVComplexFloat)); + + // Calculate magnitudes. + int n = this->get_input_size(); + float n2 = n * n; +- this->set_output(0, 10.0f * log10f(this->get_input(0) * this->get_input(0) / n2)); +- this->set_output(n / 2, 10.0f * log10f(this->get_input(1) * this->get_input(1) / n2)); ++ this->set_output(0, 10.0f * log10f(this->tmp[0] * this->tmp[0] / n2)); + for (int i = 1; i < n / 2; i++) { +- float re = this->get_input(i * 2); +- float im = this->get_input(i * 2 + 1); ++ float re = this->tmp[i * 2]; ++ float im = this->tmp[i * 2 + 1]; + this->set_output(i, 10.0f * log10f((re * re + im * im) / n2)); + } ++ this->set_output(n / 2, 10.0f * log10f(this->tmp[this->len] * this->tmp[this->len] / n2)); + } + diff --git a/pkgs/by-name/sp/spek/package.nix b/pkgs/by-name/sp/spek/package.nix index 5ff36e44fdbd..1abbb0b2a2d8 100644 --- a/pkgs/by-name/sp/spek/package.nix +++ b/pkgs/by-name/sp/spek/package.nix @@ -24,6 +24,8 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./autoconf.patch + # https://github.com/alexkay/spek/pull/338 + ./ffmpeg8-compat.patch ]; nativeBuildInputs = [