From 6d799c394c0760633d974a7bd017c1275ac7838a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 30 Jan 2020 19:02:04 +0100 Subject: [PATCH 1/2] speechd: clean up --- .../development/libraries/speechd/default.nix | 43 +++++++++++++++---- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/speechd/default.nix b/pkgs/development/libraries/speechd/default.nix index 43360d781cd..20bab968513 100644 --- a/pkgs/development/libraries/speechd/default.nix +++ b/pkgs/development/libraries/speechd/default.nix @@ -1,6 +1,15 @@ -{ stdenv, pkgconfig, fetchurl, python3Packages -, intltool, itstool, libtool, texinfo, autoreconfHook -, glib, dotconf, libsndfile +{ stdenv +, pkgconfig +, fetchurl +, python3Packages +, intltool +, itstool +, libtool +, texinfo +, autoreconfHook +, glib +, dotconf +, libsndfile , withLibao ? true, libao , withPulse ? false, libpulseaudio , withAlsa ? false, alsaLib @@ -35,11 +44,29 @@ in stdenv.mkDerivation rec { sha256 = "1wvck00w9ixildaq6hlhnf6wa576y02ac96lp6932h3k1n08jaiw"; }; - nativeBuildInputs = [ pkgconfig autoreconfHook intltool libtool itstool texinfo wrapPython ]; + nativeBuildInputs = [ + pkgconfig + autoreconfHook + intltool + libtool + itstool + texinfo + wrapPython + ]; - buildInputs = [ glib dotconf libsndfile libao libpulseaudio alsaLib python ] - ++ optionals withEspeak [ espeak sonic pcaudiolib ] - ++ optional withFlite flite + buildInputs = [ + glib + dotconf + libsndfile + libao + libpulseaudio + alsaLib + python + ] ++ optionals withEspeak [ + espeak + sonic + pcaudiolib + ] ++ optional withFlite flite ++ optional withPico svox # TODO: add flint/festival support with festival-freebsoft-utils package # ++ optional withFestival festival-freebsoft-utils @@ -73,7 +100,7 @@ in stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Common interface to speech synthesis"; - homepage = https://devel.freebsoft.org/speechd; + homepage = "https://devel.freebsoft.org/speechd"; license = licenses.gpl2Plus; maintainers = with maintainers; [ berce ]; platforms = platforms.linux; From 9d886869cba7346bc030db614e0f412da86151d1 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 30 Jan 2020 19:12:36 +0100 Subject: [PATCH 2/2] =?UTF-8?q?speechd:=200.8.8=20=E2=86=92=200.9.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0.9.0: https://lists.nongnu.org/archive/html/speechd-discuss/2019-01/msg00058.html 0.9.1: https://lists.nongnu.org/archive/html/speechd-discuss/2019-05/msg00000.html --- .../development/libraries/speechd/default.nix | 22 ++++++++++++++----- .../libraries/speechd/fix-paths.patch | 11 ++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/libraries/speechd/fix-paths.patch diff --git a/pkgs/development/libraries/speechd/default.nix b/pkgs/development/libraries/speechd/default.nix index 20bab968513..6b8e42a7c19 100644 --- a/pkgs/development/libraries/speechd/default.nix +++ b/pkgs/development/libraries/speechd/default.nix @@ -1,11 +1,13 @@ { stdenv +, substituteAll , pkgconfig , fetchurl , python3Packages -, intltool +, gettext , itstool , libtool , texinfo +, utillinux , autoreconfHook , glib , dotconf @@ -37,17 +39,24 @@ let throw "You need to enable at least one output module."; in stdenv.mkDerivation rec { pname = "speech-dispatcher"; - version = "0.8.8"; + version = "0.9.1"; src = fetchurl { - url = "http://www.freebsoft.org/pub/projects/speechd/${pname}-${version}.tar.gz"; - sha256 = "1wvck00w9ixildaq6hlhnf6wa576y02ac96lp6932h3k1n08jaiw"; + url = "https://github.com/brailcom/speechd/releases/download/${version}/${pname}-${version}.tar.gz"; + hash = "sha256:16bg52hnkrsrs7kgbzanb34b9zb6fqxwj0a9bmsxmj1skkil1h1p"; }; + patches = [ + (substituteAll { + src = ./fix-paths.patch; + inherit utillinux; + }) + ]; + nativeBuildInputs = [ pkgconfig autoreconfHook - intltool + gettext libtool itstool texinfo @@ -79,6 +88,7 @@ in stdenv.mkDerivation rec { configureFlags = [ # Audio method falls back from left to right. "--with-default-audio-method=\"libao,pulse,alsa,oss\"" + "--with-systemdsystemunitdir=${placeholder ''out''}/lib/systemd/system" ] ++ optional withPulse "--with-pulse" ++ optional withAlsa "--with-alsa" ++ optional withLibao "--with-libao" @@ -98,6 +108,8 @@ in stdenv.mkDerivation rec { wrapPythonPrograms ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Common interface to speech synthesis"; homepage = "https://devel.freebsoft.org/speechd"; diff --git a/pkgs/development/libraries/speechd/fix-paths.patch b/pkgs/development/libraries/speechd/fix-paths.patch new file mode 100644 index 00000000000..acf7e5e08f4 --- /dev/null +++ b/pkgs/development/libraries/speechd/fix-paths.patch @@ -0,0 +1,11 @@ +--- a/speech-dispatcherd.service.in ++++ b/speech-dispatcherd.service.in +@@ -19,7 +19,7 @@ + [Service] + Type=forking + ExecStart=@bindir@/speech-dispatcher -d +-ExecReload=/bin/kill -HUP $MAINPID ++ExecReload=@utillinux@/bin/kill -HUP $MAINPID + + [Install] + WantedBy=multi-user.target