2016-04-22 19:02:52 +01:00
|
|
|
{ fetchurl, lib, stdenv, intltool, libtool, pkgconfig, glib, dotconf, libsndfile
|
|
|
|
, libao, python3Packages
|
|
|
|
, withEspeak ? false, espeak
|
|
|
|
, withPico ? true, svox
|
|
|
|
}:
|
2011-02-10 19:23:27 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-04-22 19:02:52 +01:00
|
|
|
name = "speech-dispatcher-${version}";
|
2016-09-04 21:44:45 +01:00
|
|
|
version = "0.8.5";
|
2011-02-10 19:23:27 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.freebsoft.org/pub/projects/speechd/${name}.tar.gz";
|
2016-09-04 21:44:45 +01:00
|
|
|
sha256 = "18jlxnhlahyi6njc6l6576hfvmzivjjgfjyd2n7vvrvx9inphjrb";
|
2011-02-10 19:23:27 +00:00
|
|
|
};
|
|
|
|
|
2016-04-22 19:02:52 +01: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 19:23:27 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2016-04-22 19:02:52 +01: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 19:23:27 +00:00
|
|
|
|
2016-04-22 19:02:52 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Common interface to speech synthesis";
|
2011-02-10 19:23:27 +00:00
|
|
|
homepage = http://www.freebsoft.org/speechd;
|
2016-04-22 19:02:52 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2011-02-10 19:23:27 +00:00
|
|
|
};
|
|
|
|
}
|