From 945810d76ec776780038cdac77ce5cae23b4b3ca Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Thu, 6 Mar 2025 11:32:57 -0700 Subject: [PATCH] webrtc-audio-processing: Fix build for FreeBSD --- .../libraries/webrtc-audio-processing/0.3.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/webrtc-audio-processing/0.3.nix b/pkgs/development/libraries/webrtc-audio-processing/0.3.nix index c9141b34a94d..92567d5c69e2 100644 --- a/pkgs/development/libraries/webrtc-audio-processing/0.3.nix +++ b/pkgs/development/libraries/webrtc-audio-processing/0.3.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch, darwin }: +{ lib, stdenv, fetchurl, fetchpatch, darwin, autoreconfHook, pkg-config }: stdenv.mkDerivation rec { pname = "webrtc-audio-processing"; @@ -20,8 +20,25 @@ stdenv.mkDerivation rec { url = "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/uploads/2994c0512aaa76ebf41ce11c7b9ba23e/webrtc-audio-processing-0.2-big-endian.patch"; hash = "sha256-zVAj9H8SJureQd0t5O5v1je4ia8/gHJOXYxuEBEB6gg="; }) + (fetchpatch { + url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/2f3c3b1d9dadc25356da4b612130bf4dea27b817/audio/webrtc-audio-processing0/files/patch-configure.ac"; + hash = "sha256-IOSW3ZLIuRXY/M+MU813M9o0Vu4mcGoAtdNRlJwESHw="; + extraPrefix = ""; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/27f26f19a34755fe4b939a7210d8ba7ee9358a0d/audio/webrtc-audio-processing0/files/patch-webrtc_base_stringutils.h"; + hash = "sha256-j85CdFpDIPhhEquwA3P0r5djnMEGVnvfsPM2bYbURt8="; + extraPrefix = ""; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/0d316feccaf89c1bd804d6001274426a7135c93a/audio/webrtc-audio-processing0/files/patch-webrtc_base_platform__thread.cc"; + hash = "sha256-MsZtNWv3bwxJLxpQaMqj34XIBhqAaO2NkBHjlFWZreA="; + extraPrefix = ""; + }) ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]); patchPhase = lib.optionalString stdenv.hostPlatform.isMusl ''