forked from mirrors/nixpkgs
Merge pull request #195715 from Sciencentistguy/rnnoise-plugin-v1.03
This commit is contained in:
commit
bdc720fefe
|
@ -1,17 +1,53 @@
|
|||
{ lib, stdenv, SDL2, fetchFromGitHub, cmake }:
|
||||
|
||||
{ lib
|
||||
, stdenv
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
, freetype
|
||||
, gtk3-x11
|
||||
, mount
|
||||
, pcre
|
||||
, pkg-config
|
||||
, webkitgtk
|
||||
, xorg
|
||||
, llvmPackages
|
||||
, WebKit
|
||||
, MetalKit
|
||||
, CoreAudioKit
|
||||
, simd
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rnnoise-plugin";
|
||||
version = "0.91";
|
||||
version = "1.03";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "werman";
|
||||
repo = "noise-suppression-for-voice";
|
||||
rev = "v${version}";
|
||||
sha256 = "11pwisbcks7g0mdgcrrv49v3ci1l6m26bbb7f67xz4pr1hai5dwc";
|
||||
sha256 = "sha256-1DgrpGYF7G5Zr9vbgtKm/Yv0HSdI7LrFYPSGKYNnNDQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
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
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
||||
|
||||
|
@ -20,6 +56,6 @@ stdenv.mkDerivation rec {
|
|||
homepage = "https://github.com/werman/noise-suppression-for-voice";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ panaeon henrikolsson ];
|
||||
maintainers = with maintainers; [ panaeon henrikolsson sciencentistguy ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
|
||||
index 4c2300e..273d76e 100644
|
||||
--- a/src/common/CMakeLists.txt
|
||||
+++ b/src/common/CMakeLists.txt
|
||||
@@ -33,8 +33,6 @@ if (BUILD_TESTS)
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/external/catch2>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
|
||||
target_link_libraries(common_plugin_tests PRIVATE ${LIBRARIES})
|
||||
- target_compile_options(common_plugin_tests PRIVATE -fsanitize=undefined)
|
||||
- target_link_options(common_plugin_tests PRIVATE -fsanitize=undefined)
|
||||
|
||||
include(CTest)
|
||||
include(Catch)
|
||||
|
|
@ -10868,7 +10868,11 @@ with pkgs;
|
|||
|
||||
rnnoise = callPackage ../development/libraries/rnnoise { };
|
||||
|
||||
rnnoise-plugin = callPackage ../development/libraries/rnnoise-plugin {};
|
||||
# Use `apple_sdk_11_0` because `apple_sdk.libs` does not provide `simd`
|
||||
rnnoise-plugin = darwin.apple_sdk_11_0.callPackage ../development/libraries/rnnoise-plugin {
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) WebKit MetalKit CoreAudioKit;
|
||||
inherit (darwin.apple_sdk_11_0.libs) simd;
|
||||
};
|
||||
|
||||
rnote = callPackage ../applications/graphics/rnote {
|
||||
inherit (gst_all_1) gstreamer;
|
||||
|
|
Loading…
Reference in a new issue