nixpkgs/pkgs/applications/audio/svox/default.nix

44 lines
1019 B
Nix
Raw Normal View History

2016-04-23 00:20:17 +01:00
{ stdenv, fetchgit }:
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
pname = "svox";
2017-07-27 13:49:32 +01:00
version = "2017-07-18";
2016-04-23 00:20:17 +01:00
src = fetchgit {
url = "https://android.googlesource.com/platform/external/svox";
2017-07-27 13:49:32 +01:00
rev = "7e68d0e9aac1b5d2ad15e92ddaa3bceb27973fcb";
sha256 = "1bqj12w23nn27x64ianm2flrqvkskpvgrnly7ah8gv6k8s8chh3r";
2016-04-23 00:20:17 +01:00
};
postPatch = ''
cd pico
'';
buildPhase = ''
cd lib
for i in *.c; do
$CC -O2 -fPIC -c -o ''${i%.c}.o $i
done
$CC -shared -o libttspico.so *.o
cd ..
'';
installPhase = ''
install -Dm755 lib/libttspico.so $out/lib/libttspico.so
mkdir -p $out/include
cp lib/*.h $out/include
mkdir -p $out/share/pico/lang
cp lang/*.bin $out/share/pico/lang
'';
2019-10-30 01:29:30 +00:00
NIX_CFLAGS_COMPILE = "-include stdint.h";
2016-04-23 00:20:17 +01:00
meta = with stdenv.lib; {
description = "Text-to-speech engine";
homepage = https://android.googlesource.com/platform/external/svox;
2016-04-23 00:20:17 +01:00
platforms = platforms.linux;
license = licenses.asl20;
maintainers = with maintainers; [ abbradar ];
};
}