diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/webrtc-audio-processing')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix | 26 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix | 33 |
2 files changed, 51 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix new file mode 100644 index 000000000000..1ce3c2d9fa8b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/0.3.nix @@ -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; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix index 1ce3c2d9fa8b..5a53564603d8 100644 --- a/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix +++ b/nixpkgs/pkgs/development/libraries/webrtc-audio-processing/default.nix @@ -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 ''; @@ -21,6 +36,8 @@ stdenv.mkDerivation rec { 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; + # attempts to inline 256bit AVX instructions on x86 + # https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5 + platforms = lib.lists.subtractLists platforms.i686 platforms.unix; }; } |