2022-10-12 19:52:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, cmake
|
|
|
|
, fetchFromGitHub
|
|
|
|
, freetype
|
|
|
|
, gtk3-x11
|
|
|
|
, mount
|
|
|
|
, pcre
|
|
|
|
, pkg-config
|
|
|
|
, webkitgtk
|
|
|
|
, xorg
|
|
|
|
, llvmPackages
|
|
|
|
, WebKit
|
|
|
|
, MetalKit
|
|
|
|
, CoreAudioKit
|
|
|
|
, simd
|
|
|
|
}:
|
2020-07-19 15:34:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "rnnoise-plugin";
|
2022-10-12 19:52:51 +00:00
|
|
|
version = "1.03";
|
2020-07-19 15:34:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "werman";
|
|
|
|
repo = "noise-suppression-for-voice";
|
|
|
|
rev = "v${version}";
|
2022-10-12 19:52:51 +00:00
|
|
|
sha256 = "sha256-1DgrpGYF7G5Zr9vbgtKm/Yv0HSdI7LrFYPSGKYNnNDQ=";
|
2020-07-19 15:34:54 +00:00
|
|
|
};
|
|
|
|
|
2022-10-12 19:52:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
|
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
|
|
|
# Ubsan seems to be broken on aarch64-darwin, it produces linker errors similar to https://github.com/NixOS/nixpkgs/issues/140751
|
|
|
|
./disable-ubsan.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
freetype
|
|
|
|
gtk3-x11
|
|
|
|
pcre
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXrandr
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
webkitgtk
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
WebKit
|
|
|
|
MetalKit
|
|
|
|
CoreAudioKit
|
|
|
|
simd
|
|
|
|
];
|
2020-07-19 15:34:54 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-07-19 15:34:54 +00:00
|
|
|
description = "A real-time noise suppression plugin for voice based on Xiph's RNNoise";
|
|
|
|
homepage = "https://github.com/werman/noise-suppression-for-voice";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.all;
|
2022-10-12 19:52:51 +00:00
|
|
|
maintainers = with maintainers; [ panaeon henrikolsson sciencentistguy ];
|
2020-07-19 15:34:54 +00:00
|
|
|
};
|
|
|
|
}
|