espeakedit: version bump 1.46.02 -> 1.48.03 (and add to channel)
The one-liner gcc buildPhase doesn't work anymore, so I'm using upstream Makefile instead. The Makefile needs a tiny patch to work (not nixpkgs specific). Also fixup path to 'sox' and espeak-data/ (runtime deps) by providing full paths. TODO: Uhm, seems like espeakedit still wants espeak-data/ in $HOME, even thought I've told it to 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
This commit is contained in:
@@ -1,31 +1,57 @@
|
||||
{stdenv, fetchurl, unzip, portaudio, wxGTK}:
|
||||
{ stdenv, fetchurl, pkgconfig, unzip, portaudio, wxGTK, sox }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "espeakedit-1.48.03";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "espeakedit-1.46.02";
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/espeak/espeakedit-1.46.02.zip;
|
||||
sha256 = "1cc5r89sn8zz7b8wj4grx9xb7aqyi0ybj0li9hpy7hd67r56kqkl";
|
||||
url = "mirror://sourceforge/espeak/${name}.zip";
|
||||
sha256 = "0x8s7vpb7rw5x37yjzy1f98m4f2csdg89libb74fm36gn8ly0hli";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip portaudio wxGTK ];
|
||||
buildInputs = [ pkgconfig unzip portaudio wxGTK ];
|
||||
|
||||
patchPhase = if portaudio.api_version == 19 then ''
|
||||
# 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 = [
|
||||
./espeakedit-fix-makefile.patch
|
||||
./espeakedit-configurable-sox-path.patch
|
||||
./espeakedit-configurable-path-espeak-data.patch
|
||||
];
|
||||
|
||||
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
|
||||
'' + stdenv.lib.optionalString (portaudio.api_version == 19) ''
|
||||
cp src/portaudio19.h src/portaudio.h
|
||||
'' else "";
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
cd src
|
||||
gcc -o espeakedit *.cpp `wx-config --cxxflags --libs`
|
||||
make -C src
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
ensureDir $out/bin
|
||||
cp espeakedit $out/bin
|
||||
mkdir -p "$out/bin"
|
||||
cp src/espeakedit "$out/bin"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Phoneme editor for espeak";
|
||||
homepage = http://espeak.sourceforge.net/;
|
||||
license = "GPLv3+";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user