3
0
Fork 0
forked from mirrors/nixpkgs

speech_tools: reimplement using mkDerivation

This commit is contained in:
Joachim Fasting 2015-06-25 22:57:31 +02:00
parent 022bbe1c0c
commit a2ccc80774

View file

@ -1,40 +1,22 @@
x@{builderDefsPackage { stdenv, fetchurl, gawk, alsaLib, ncurses }:
, gawk, alsaLib, ncurses
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "speech_tools-${version}";
sourceInfo = rec { version = "2.1";
baseName="speech_tools";
version="2.1"; src = fetchurl {
name="${baseName}-${version}"; url = "http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz";
url="http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz"; sha256 = "1s9bkfgdgyas8v2cr7x3dg0ck1xf9mn1q6a73gwy524sjb6nfqgz";
hash="1s9bkfgdgyas8v2cr7x3dg0ck1xf9mn1q6a73gwy524sjb6nfqgz";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
inherit (sourceInfo) name version; buildInputs = [ alsaLib ncurses ];
inherit buildInputs;
/* doConfigure should be removed if not needed */ preConfigure = ''
phaseNames = ["doUnpack" "killUsrBin" "doConfigure" "doMakeInstall" "doDeploy" "fixPaths"];
killUsrBin = a.fullDepEntry ''
sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . ) sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . )
sed -re 's@/bin/(rm|printf|uname)@\1@g' -i $( grep -rl '/bin/' . ) sed -re 's@/bin/(rm|printf|uname)@\1@g' -i $( grep -rl '/bin/' . )
'' ["minInit" "doUnpack"]; '';
doDeploy = a.fullDepEntry '' installPhase = ''
mkdir -p "$out"/{bin,lib} mkdir -p "$out"/{bin,lib}
for d in bin lib; do for d in bin lib; do
for i in ./$d/*; do for i in ./$d/*; do
@ -42,24 +24,21 @@ rec {
cp -r "$(readlink -f $i)" "$out/$d" cp -r "$(readlink -f $i)" "$out/$d"
done done
done done
'' ["doMakeInstall" "defEnsureDir"]; '';
fixPaths = a.doPatchShebangs "$out/bin"; meta = with stdenv.lib; {
meta = {
broken = true; broken = true;
description = "Text-to-speech engine"; description = "Text-to-speech engine";
maintainers = with a.lib.maintainers; maintainers = with maintainers;
[ [
raskin raskin
]; ];
platforms = with a.lib.platforms; platforms = platforms.linux;
linux; license = licenses.free;
license = a.lib.licenses.free;
}; };
passthru = { passthru = {
updateInfo = { updateInfo = {
downloadPage = "http://www.festvox.org/packed/festival/"; downloadPage = "http://www.festvox.org/packed/festival/";
}; };
}; };
}) x }