2016-04-22 20:02:52 +02:00
|
|
|
{ fetchurl, lib, stdenv, intltool, libtool, pkgconfig, glib, dotconf, libsndfile
|
|
|
|
, libao, python3Packages
|
|
|
|
, withEspeak ? false, espeak
|
|
|
|
, withPico ? true, svox
|
|
|
|
}:
|
2011-02-10 20:23:27 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-04-22 20:02:52 +02:00
|
|
|
name = "speech-dispatcher-${version}";
|
|
|
|
version = "0.8.3";
|
2011-02-10 20:23:27 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.freebsoft.org/pub/projects/speechd/${name}.tar.gz";
|
2016-04-22 20:02:52 +02:00
|
|
|
sha256 = "0kqy7z4l59n2anc7xn588w4rkacig1hajx8c53qrh90ypar978ln";
|
2011-02-10 20:23:27 +01:00
|
|
|
};
|
|
|
|
|
2016-04-22 20:02:52 +02:00
|
|
|
buildInputs = [ intltool libtool glib dotconf libsndfile libao python3Packages.python ]
|
|
|
|
++ lib.optional withEspeak espeak
|
|
|
|
++ lib.optional withPico svox;
|
|
|
|
nativeBuildInputs = [ pkgconfig python3Packages.wrapPython ];
|
2011-02-10 20:23:27 +01:00
|
|
|
|
2016-04-22 20:02:52 +02:00
|
|
|
pythonPath = with python3Packages; [ pyxdg ];
|
|
|
|
|
|
|
|
postPatch = lib.optionalString withPico ''
|
|
|
|
sed -i 's,/usr/share/pico/lang/,${svox}/share/pico/lang/,g' src/modules/pico.c
|
|
|
|
'';
|
2011-02-10 20:23:27 +01:00
|
|
|
|
2016-04-22 20:02:52 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Common interface to speech synthesis";
|
2011-02-10 20:23:27 +01:00
|
|
|
homepage = http://www.freebsoft.org/speechd;
|
2016-04-22 20:02:52 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2011-02-10 20:23:27 +01:00
|
|
|
};
|
|
|
|
}
|