at 23.05-pre 43 lines 1.4 kB view raw
1{ lib, stdenv, fetchurl 2, darwin 3, abseil-cpp_202111 4, meson 5, ninja 6}: 7 8stdenv.mkDerivation rec { 9 pname = "webrtc-audio-processing"; 10 version = "1.0"; 11 12 src = fetchurl { 13 url = "https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/archive/v1.0/webrtc-audio-processing-v${version}.tar.gz"; 14 sha256 = "sha256-dqRy1OfOG9TX2cgCD8cowU44zVanns/nPYZrilPfuiU="; 15 }; 16 17 nativeBuildInputs = [ 18 meson 19 ninja 20 ]; 21 22 buildInputs = [ 23 abseil-cpp_202111 24 ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]); 25 26 patchPhase = '' 27 # this is just incorrect upstream 28 # see https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/4 29 substituteInPlace meson.build \ 30 --replace "absl_flags_registry" "absl_flags_reflection" 31 '' + lib.optionalString stdenv.hostPlatform.isMusl '' 32 substituteInPlace webrtc/base/checks.cc --replace 'defined(__UCLIBC__)' 1 33 ''; 34 35 meta = with lib; { 36 homepage = "http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing"; 37 description = "A more Linux packaging friendly copy of the AudioProcessing module from the WebRTC project"; 38 license = licenses.bsd3; 39 # attempts to inline 256bit AVX instructions on x86 40 # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5 41 platforms = lib.lists.subtractLists platforms.i686 platforms.unix; 42 }; 43}