summary refs log tree commit diff
path: root/pkgs/development/libraries/speechd
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-04-22 21:02:52 +0300
committerNikolay Amiantov <ab@fmap.me>2016-04-23 02:27:36 +0300
commitf3435096e2110ab78e4edeba3bfb0d905d19b2ed (patch)
treec25233042912f19190fcf24560f032b4bbb9bb15 /pkgs/development/libraries/speechd
parentb9682eba1784b1aa9b6835c78ce302eda8d2bc11 (diff)
downloadnixpkgs-f3435096e2110ab78e4edeba3bfb0d905d19b2ed.tar
nixpkgs-f3435096e2110ab78e4edeba3bfb0d905d19b2ed.tar.gz
nixpkgs-f3435096e2110ab78e4edeba3bfb0d905d19b2ed.tar.bz2
nixpkgs-f3435096e2110ab78e4edeba3bfb0d905d19b2ed.tar.lz
nixpkgs-f3435096e2110ab78e4edeba3bfb0d905d19b2ed.tar.xz
nixpkgs-f3435096e2110ab78e4edeba3bfb0d905d19b2ed.tar.zst
nixpkgs-f3435096e2110ab78e4edeba3bfb0d905d19b2ed.zip
speechd: 0.7.1 -> 0.8.3
Make it actually useful -- support sound output and several voice modules
Diffstat (limited to 'pkgs/development/libraries/speechd')
-rw-r--r--pkgs/development/libraries/speechd/default.nix33
1 files changed, 25 insertions, 8 deletions
diff --git a/pkgs/development/libraries/speechd/default.nix b/pkgs/development/libraries/speechd/default.nix
index 5104532ea91..613fee3c6d6 100644
--- a/pkgs/development/libraries/speechd/default.nix
+++ b/pkgs/development/libraries/speechd/default.nix
@@ -1,20 +1,37 @@
-{ fetchurl, stdenv, dotconf, glib, pkgconfig }:
+{ fetchurl, lib, stdenv, intltool, libtool, pkgconfig, glib, dotconf, libsndfile
+, libao, python3Packages
+, withEspeak ? false, espeak
+, withPico ? true, svox
+}:
 
 stdenv.mkDerivation rec {
-  name = "speech-dispatcher-" + version;
-  version = "0.7.1";
+  name = "speech-dispatcher-${version}";
+  version = "0.8.3";
 
   src = fetchurl {
     url = "http://www.freebsoft.org/pub/projects/speechd/${name}.tar.gz";
-    sha256 = "0laag72iw03545zggdzcr860b8q7w1vrjr3csd2ldps7jhlwzad8";
+    sha256 = "0kqy7z4l59n2anc7xn588w4rkacig1hajx8c53qrh90ypar978ln";
   };
 
-  buildInputs = [ dotconf glib pkgconfig ];
+  buildInputs = [ intltool libtool glib dotconf libsndfile libao python3Packages.python ]
+             ++ lib.optional withEspeak espeak
+             ++ lib.optional withPico svox;
+  nativeBuildInputs = [ pkgconfig python3Packages.wrapPython ];
 
-  meta = {
-    description = "Common interface to speech synthesis";
+  pythonPath = with python3Packages; [ pyxdg ];
+
+  postPatch = lib.optionalString withPico ''
+    sed -i 's,/usr/share/pico/lang/,${svox}/share/pico/lang/,g' src/modules/pico.c
+  '';
 
+  postInstall = ''
+    wrapPythonPrograms
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Common interface to speech synthesis";
     homepage = http://www.freebsoft.org/speechd;
-    license = stdenv.lib.licenses.gpl2Plus;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
   };
 }