Merge pull request #294631 from TomaSajt/freetts
freetts: clean up and make deterministic
This commit is contained in:
commit
c38b6d6cef
2 changed files with 45 additions and 19 deletions
|
@ -1,29 +1,53 @@
|
||||||
{stdenv, fetchurl, apacheAnt, unzip, sharutils, lib, jdk}:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchzip
|
||||||
|
, ant
|
||||||
|
, jdk8
|
||||||
|
, sharutils
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "freetts";
|
pname = "freetts";
|
||||||
version = "1.2.2";
|
version = "1.2.2";
|
||||||
src = fetchurl {
|
|
||||||
url = "mirror://sourceforge/freetts/${pname}-${version}-src.zip";
|
src = fetchzip {
|
||||||
sha256 = "0mnikqhpf4f4jdr0irmibr8yy0dnffx1i257y22iamxi7a6by2r7";
|
url = "mirror://sourceforge/freetts/${finalAttrs.pname}-${finalAttrs.version}-src.zip";
|
||||||
|
hash = "sha256-+bhM0ErEZVnmcz5CBqn/AeGaOhKnCjZzGeqgO/89wms=";
|
||||||
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ unzip ];
|
|
||||||
buildInputs = [ apacheAnt sharutils jdk ];
|
nativeBuildInputs = [
|
||||||
unpackPhase = ''
|
ant
|
||||||
unzip $src -x META-INF/*
|
jdk8
|
||||||
|
sharutils
|
||||||
|
];
|
||||||
|
|
||||||
|
sourceRoot = "${finalAttrs.src.name}/freetts-${finalAttrs.version}";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# Fix jar timestamps for reproducibility
|
||||||
|
substituteInPlace build.xml demo.xml \
|
||||||
|
--replace-fail '<jar ' '<jar modificationtime="0" '
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd */lib
|
runHook preBuild
|
||||||
|
|
||||||
|
pushd lib
|
||||||
sed -i -e "s/more/cat/" jsapi.sh
|
sed -i -e "s/more/cat/" jsapi.sh
|
||||||
echo y | sh jsapi.sh
|
echo y | sh jsapi.sh
|
||||||
cd ..
|
popd
|
||||||
|
|
||||||
ln -s . src
|
ln -s . src
|
||||||
ant
|
ant
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -v -m755 -d $out/{lib,docs/{audio,images}}
|
runHook preInstall
|
||||||
install -v -m644 lib/*.jar $out/lib
|
install -Dm644 lib/*.jar -t $out/lib
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
@ -32,8 +56,12 @@ stdenv.mkDerivation rec {
|
||||||
Text to speech system based on Festival written in Java.
|
Text to speech system based on Festival written in Java.
|
||||||
Can be used in combination with KDE accessibility.
|
Can be used in combination with KDE accessibility.
|
||||||
'';
|
'';
|
||||||
license = "GPL";
|
|
||||||
homepage = "http://freetts.sourceforge.net";
|
homepage = "http://freetts.sourceforge.net";
|
||||||
maintainers = [ lib.maintainers.sander ];
|
license = lib.licenses.bsdOriginal;
|
||||||
|
maintainers = with lib.maintainers; [ sander ];
|
||||||
|
sourceProvenance = with lib.sourceTypes; [
|
||||||
|
fromSource
|
||||||
|
binaryBytecode # jsapi.jar is bundled in a self-extracting shell-script
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -21099,9 +21099,7 @@ with pkgs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
freetts = callPackage ../development/libraries/freetts {
|
freetts = callPackage ../development/libraries/freetts { };
|
||||||
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
|
||||||
};
|
|
||||||
|
|
||||||
frog = res.languageMachines.frog;
|
frog = res.languageMachines.frog;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue