depot/third_party/nixpkgs/pkgs/applications/audio/mbrola/voices.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

51 lines
961 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
unstableGitUpdater,
mbrola,
languages ? [ ],
}:
let
src = fetchFromGitHub {
owner = "numediart";
repo = "MBROLA-voices";
rev = "fe05a0ccef6a941207fd6aaad0b31294a1f93a51";
hash = "sha256-QBUggnde5iNeCESzxE0btVVTDOxc3Kdk483mdGUXHvA=";
};
meta = {
description = "Speech synthesizer based on the concatenation of diphones (voice files)";
homepage = "https://github.com/numediart/MBROLA-voices";
license = mbrola.meta.license;
};
in
if (languages == [ ]) then
src // { inherit meta; }
else
stdenv.mkDerivation {
pname = "mbrola-voices";
version = "0-unstable-2020-03-30";
inherit src;
postPatch = ''
shopt -s extglob
pushd data
rm -rfv !(${lib.concatStringsSep "|" languages})
popd
'';
installPhase = ''
runHook preInstall
mkdir $out
cp -R data $out/
runHook postInstall
'';
inherit meta;
}