linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / speech-tools / default.nix
blobc54b4a3721f62f406cbe4f5454b1389dcee27bae
1 { lib, stdenv, fetchurl, alsaLib, ncurses }:
3 stdenv.mkDerivation rec {
4   name = "speech_tools-${version}.0";
5   version = "2.5";
7   src = fetchurl {
8     url = "http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz";
9     sha256 = "1k2xh13miyv48gh06rgsq2vj25xwj7z6vwq9ilsn8i7ig3nrgzg4";
10   };
12   buildInputs = [ alsaLib ncurses ];
14   preConfigure = ''
15     sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . )
16     sed -re 's@/bin/(rm|printf|uname)@\1@g' -i $( grep -rl '/bin/' . )
18     # c99 makes isnan valid for float and double
19     substituteInPlace include/EST_math.h \
20       --replace '__isnanf(X)' 'isnan(X)'
21   '';
23   installPhase = ''
24     mkdir -p "$out"/{bin,lib}
25     for d in bin lib; do
26       for i in ./$d/*; do
27         test "$(basename "$i")" = "Makefile" ||
28           cp -r "$(readlink -f $i)" "$out/$d"
29       done
30     done
31   '';
33   doCheck = true;
35   checkTarget = "test";
37   meta = with lib; {
38     description = "Text-to-speech engine";
39     maintainers = with maintainers; [ raskin ];
40     platforms = platforms.linux;
41     license = licenses.free;
42   };
44   passthru = {
45     updateInfo = {
46       downloadPage = "http://www.festvox.org/packed/festival/";
47     };
48   };