webrtc-audio-processing: init 1.0

This commit is contained in:
Jonathan Ringer 2022-02-05 13:55:46 -08:00 committed by Jonathan Ringer
parent a0da54e4d1
commit 3c26e7ce33
3 changed files with 52 additions and 8 deletions

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchurl, darwin }:
stdenv.mkDerivation rec {
pname = "webrtc-audio-processing";
version = "0.3.1";
src = fetchurl {
url = "https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${version}.tar.xz";
sha256 = "1gsx7k77blfy171b6g3m0k0s0072v6jcawhmx1kjs9w5zlwdkzd0";
};
patches = [ ./enable-riscv.patch ];
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]);
patchPhase = lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace webrtc/base/checks.cc --replace 'defined(__UCLIBC__)' 1
'';
meta = with lib; {
homepage = "http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing";
description = "A more Linux packaging friendly copy of the AudioProcessing module from the WebRTC project";
license = licenses.bsd3;
platforms = platforms.unix;
};
}

View file

@ -1,19 +1,34 @@
{ lib, stdenv, fetchurl, darwin }:
{ lib, stdenv, fetchurl
, darwin
, abseil-cpp_202111
, meson
, ninja
}:
stdenv.mkDerivation rec {
pname = "webrtc-audio-processing";
version = "0.3.1";
version = "1.0";
src = fetchurl {
url = "https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${version}.tar.xz";
sha256 = "1gsx7k77blfy171b6g3m0k0s0072v6jcawhmx1kjs9w5zlwdkzd0";
url = "https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/archive/v1.0/webrtc-audio-processing-v${version}.tar.gz";
sha256 = "sha256-dqRy1OfOG9TX2cgCD8cowU44zVanns/nPYZrilPfuiU=";
};
patches = [ ./enable-riscv.patch ];
nativeBuildInputs = [
meson
ninja
];
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]);
buildInputs = [
abseil-cpp_202111
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ ApplicationServices ]);
patchPhase = lib.optionalString stdenv.hostPlatform.isMusl ''
patchPhase = ''
# this is just incorrect upstream
# see https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/4
substituteInPlace meson.build \
--replace "absl_flags_registry" "absl_flags_reflection"
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace webrtc/base/checks.cc --replace 'defined(__UCLIBC__)' 1
'';

View file

@ -20400,7 +20400,10 @@ with pkgs;
websocketpp = callPackage ../development/libraries/websocket++ { };
webrtc-audio-processing = callPackage ../development/libraries/webrtc-audio-processing { };
webrtc-audio-processing_1 = callPackage ../development/libraries/webrtc-audio-processing { };
webrtc-audio-processing_0_3 = callPackage ../development/libraries/webrtc-audio-processing/0.3.nix { };
# bump when majoring of packages have updated
webrtc-audio-processing = webrtc-audio-processing_0_3;
wildmidi = callPackage ../development/libraries/wildmidi { };