1{stdenv, fetchurl, apacheAnt, unzip, sharutils, lib, jdk}:
2
3stdenv.mkDerivation rec {
4 pname = "freetts";
5 version = "1.2.2";
6 src = fetchurl {
7 url = "mirror://sourceforge/freetts/${pname}-${version}-src.zip";
8 sha256 = "0mnikqhpf4f4jdr0irmibr8yy0dnffx1i257y22iamxi7a6by2r7";
9 };
10 nativeBuildInputs = [ unzip ];
11 buildInputs = [ apacheAnt sharutils jdk ];
12 unpackPhase = ''
13 unzip $src -x META-INF/*
14 '';
15
16 buildPhase = ''
17 cd */lib
18 sed -i -e "s/more/cat/" jsapi.sh
19 echo y | sh jsapi.sh
20 cd ..
21 ln -s . src
22 ant
23 '';
24 installPhase = ''
25 install -v -m755 -d $out/{lib,docs/{audio,images}}
26 install -v -m644 lib/*.jar $out/lib
27 '';
28
29 meta = {
30 description = "Text to speech system based on Festival written in Java";
31 longDescription = ''
32 Text to speech system based on Festival written in Java.
33 Can be used in combination with KDE accessibility.
34 '';
35 license = "GPL";
36 homepage = "http://freetts.sourceforge.net";
37 maintainers = [ lib.maintainers.sander ];
38 };
39}