summary refs log tree commit diff
path: root/pkgs/development/libraries/freetts/default.nix
blob: f7a605ea872be61a23ff53369c62ad632bd88f76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{stdenv, fetchurl, apacheAnt, unzip, sharutils, lib, jdk}:

stdenv.mkDerivation {
  name = "freetts-1.2.2";
  src = fetchurl {
    url = "mirror://sourceforge/freetts/freetts-1.2.2-src.zip";
    sha256 = "0mnikqhpf4f4jdr0irmibr8yy0dnffx1i257y22iamxi7a6by2r7";
  };
  buildInputs = [ apacheAnt unzip sharutils jdk ];
  unpackPhase = ''
    unzip $src -x META-INF/*
  '';

  buildPhase = ''
    cd */lib
    sed -i -e "s/more/cat/" jsapi.sh
    echo y | sh jsapi.sh
    cd ..
    ln -s . src
    ant
  '';
  installPhase = ''
    install -v -m755 -d $out/{lib,docs/{audio,images}}
    install -v -m644 lib/*.jar $out/lib
  '';

  meta = {
    description = "Text to speech system based on Festival written in Java";
    longDescription = ''
      Text to speech system based on Festival written in Java.
      Can be used in combination with KDE accessibility.
    '';
    license = "GPL";
    homepage = "http://freetts.sourceforge.net";
    maintainers = [ lib.maintainers.sander ];
  };
}