base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / sp / speech-denoiser / package.nix
bloba0c3d2d257061f1c406d7e99d8cfc1ec84c3ff01
1 { lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, lv2, meson, ninja }:
3 let
4   speech-denoiser-src = fetchFromGitHub {
5     owner = "lucianodato";
6     repo = "speech-denoiser";
7     rev = "04cfba929630404f8d4f4ca5bac8d9b09a99152f";
8     sha256 = "189l6lz8sz5vr6bjyzgcsrvksl1w6crqsg0q65r94b5yjsmjnpr4";
9   };
11   rnnoise-nu = stdenv.mkDerivation {
12     pname = "rnnoise-nu";
13     version = "unstable-07-10-2019";
14     src = speech-denoiser-src;
15     sourceRoot = "${speech-denoiser-src.name}/rnnoise";
16     nativeBuildInputs = [ autoreconfHook ];
17     configureFlags = [ "--disable-examples" "--disable-doc" "--disable-shared" "--enable-static" ];
18     installTargets = [ "install-rnnoise-nu" ];
19   };
21 stdenv.mkDerivation  {
22   pname = "speech-denoiser";
23   version = "unstable-07-10-2019";
25   src = speech-denoiser-src;
27   nativeBuildInputs = [ pkg-config meson ninja ];
28   buildInputs = [ lv2 rnnoise-nu ];
30   mesonFlags = [ "--prefix=${placeholder "out"}/lib/lv2" ];
32   postPatch = ''
33     substituteInPlace meson.build \
34       --replace "cc.find_library('rnnoise-nu',dirs: meson.current_source_dir() + '/rnnoise/.libs/',required : true)" "cc.find_library('rnnoise-nu', required : true)"
35   '';
37   meta = with lib; {
38     broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
39     description = "Speech denoise lv2 plugin based on RNNoise library";
40     homepage = "https://github.com/lucianodato/speech-denoiser";
41     license = licenses.lgpl3;
42     maintainers = [ maintainers.magnetophon ];
43     platforms = platforms.linux;
44   };