diff options
Diffstat (limited to 'pkgs/applications/audio/espeak-ng/default.nix')
-rw-r--r-- | pkgs/applications/audio/espeak-ng/default.nix | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/pkgs/applications/audio/espeak-ng/default.nix b/pkgs/applications/audio/espeak-ng/default.nix index 32cec811d00..44d5a0aa15a 100644 --- a/pkgs/applications/audio/espeak-ng/default.nix +++ b/pkgs/applications/audio/espeak-ng/default.nix @@ -1,5 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, autoconf, automake, which, libtool, pkgconfig -, ronn +{ stdenv, lib, fetchFromGitHub, autoconf, automake, which, libtool, pkg-config +, ronn, substituteAll +, mbrolaSupport ? true, mbrola , pcaudiolibSupport ? true, pcaudiolib , sonicSupport ? true, sonic }: @@ -14,22 +15,36 @@ stdenv.mkDerivation rec { sha256 = "0jkqhf2h94vbqq7mg7mmm23bq372fa7mdk941my18c3vkldcir1b"; }; - nativeBuildInputs = [ autoconf automake which libtool pkgconfig ronn ]; + patches = lib.optionals mbrolaSupport [ + # Hardcode correct mbrola paths. + (substituteAll { + src = ./mbrola.patch; + inherit mbrola; + }) + ]; - buildInputs = lib.optional pcaudiolibSupport pcaudiolib + nativeBuildInputs = [ autoconf automake which libtool pkg-config ronn ]; + + buildInputs = lib.optional mbrolaSupport mbrola + ++ lib.optional pcaudiolibSupport pcaudiolib ++ lib.optional sonicSupport sonic; preConfigure = "./autogen.sh"; - postInstall = '' + configureFlags = [ + "--with-mbrola=${if mbrolaSupport then "yes" else "no"}" + ]; + + postInstall = lib.optionalString stdenv.isLinux '' patchelf --set-rpath "$(patchelf --print-rpath $out/bin/espeak-ng)" $out/bin/speak-ng ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak"; - homepage = src.meta.homepage; - license = licenses.gpl3; + homepage = "https://github.com/espeak-ng/espeak-ng"; + changelog = "https://github.com/espeak-ng/espeak-ng/blob/${version}/CHANGELOG.md"; + license = licenses.gpl3Plus; maintainers = with maintainers; [ aske ]; - platforms = platforms.linux; + platforms = platforms.all; }; } |