2021-01-19 07:50:56 +01:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, unzip, portaudio, wxGTK, sox }:
|
2013-09-02 21:53:57 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-11-07 21:29:51 +01:00
|
|
|
pname = "espeakedit";
|
|
|
|
version = "1.48.03";
|
2012-08-27 19:42:05 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-11-07 21:29:51 +01:00
|
|
|
url = "mirror://sourceforge/espeak/espeakedit-${version}.zip";
|
2013-09-02 21:53:57 +02:00
|
|
|
sha256 = "0x8s7vpb7rw5x37yjzy1f98m4f2csdg89libb74fm36gn8ly0hli";
|
2012-08-27 19:42:05 +02:00
|
|
|
};
|
|
|
|
|
2021-02-20 22:01:53 +01:00
|
|
|
nativeBuildInputs = [ pkg-config unzip ];
|
|
|
|
buildInputs = [ portaudio wxGTK ];
|
2013-09-02 21:53:57 +02:00
|
|
|
|
|
|
|
# TODO:
|
|
|
|
# Uhm, seems like espeakedit still wants espeak-data/ in $HOME, even thought
|
|
|
|
# it should use $espeak/share/espeak-data. Have to contact upstream to get
|
|
|
|
# this fixed.
|
|
|
|
#
|
|
|
|
# Workaround:
|
|
|
|
# cp -r $(nix-build -A espeak)/share/espeak-data ~
|
|
|
|
# chmod +w ~/espeak-data
|
|
|
|
|
|
|
|
patches = [
|
2017-09-01 16:47:04 +02:00
|
|
|
./gcc6.patch
|
2013-09-02 21:53:57 +02:00
|
|
|
./espeakedit-fix-makefile.patch
|
|
|
|
./espeakedit-configurable-sox-path.patch
|
|
|
|
./espeakedit-configurable-path-espeak-data.patch
|
2017-09-01 16:47:04 +02:00
|
|
|
./espeakedit-gcc6.patch
|
2013-09-02 21:53:57 +02:00
|
|
|
];
|
2012-08-27 19:42:05 +02:00
|
|
|
|
2013-09-02 21:53:57 +02:00
|
|
|
postPatch = ''
|
|
|
|
# Disable -Wall flag because it's noisy
|
|
|
|
sed -i "s/-Wall//g" src/Makefile
|
|
|
|
|
|
|
|
# Fixup paths (file names from above espeak-configurable* patches)
|
|
|
|
for file in src/compiledata.cpp src/readclause.cpp src/speech.h; do
|
|
|
|
sed -e "s|@sox@|${sox}/bin/sox|" \
|
|
|
|
-e "s|@prefix@|$out|" \
|
|
|
|
-i "$file"
|
|
|
|
done
|
2021-01-15 14:21:58 +01:00
|
|
|
'' + lib.optionalString (portaudio.api_version == 19) ''
|
2012-08-27 19:42:05 +02:00
|
|
|
cp src/portaudio19.h src/portaudio.h
|
2013-09-02 21:53:57 +02:00
|
|
|
'';
|
2012-08-27 19:42:05 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
2013-09-02 21:53:57 +02:00
|
|
|
make -C src
|
2012-08-27 19:42:05 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2013-09-02 21:53:57 +02:00
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp src/espeakedit "$out/bin"
|
2012-08-27 19:42:05 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2012-08-27 19:42:05 +02:00
|
|
|
description = "Phoneme editor for espeak";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://espeak.sourceforge.net/";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2013-09-02 21:53:57 +02:00
|
|
|
platforms = platforms.linux;
|
2012-08-27 19:42:05 +02:00
|
|
|
};
|
|
|
|
}
|