1 { lib, stdenv, fetchurl, pkg-config, unzip, portaudio, wxGTK32, sox }:
3 stdenv.mkDerivation rec {
8 url = "mirror://sourceforge/espeak/espeakedit-${version}.zip";
9 sha256 = "0x8s7vpb7rw5x37yjzy1f98m4f2csdg89libb74fm36gn8ly0hli";
12 nativeBuildInputs = [ pkg-config unzip ];
13 buildInputs = [ portaudio wxGTK32 ];
16 # Uhm, seems like espeakedit still wants espeak-data/ in $HOME, even thought
17 # it should use $espeak/share/espeak-data. Have to contact upstream to get
21 # cp -r $(nix-build -A espeak)/share/espeak-data ~
22 # chmod +w ~/espeak-data
26 ./espeakedit-fix-makefile.patch
27 ./espeakedit-configurable-sox-path.patch
28 ./espeakedit-configurable-path-espeak-data.patch
29 ./espeakedit-gcc6.patch
30 ./espeakedit-wxgtk30.patch
34 # Disable -Wall flag because it's noisy
35 sed -i "s/-Wall//g" src/Makefile
37 # Fixup paths (file names from above espeak-configurable* patches)
38 for file in src/compiledata.cpp src/readclause.cpp src/speech.h; do
39 sed -e "s|@sox@|${sox}/bin/sox|" \
40 -e "s|@prefix@|$out|" \
43 '' + lib.optionalString (portaudio.api_version == 19) ''
44 cp src/portaudio19.h src/portaudio.h
53 cp src/espeakedit "$out/bin"
57 description = "Phoneme editor for espeak";
58 mainProgram = "espeakedit";
59 homepage = "https://espeak.sourceforge.net/";
60 license = licenses.gpl3Plus;
61 platforms = platforms.linux;