Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
61 lines
1.4 KiB
Nix
61 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
runCommandLocal,
|
|
mbrola-voices,
|
|
}:
|
|
|
|
let
|
|
pname = "mbrola";
|
|
version = "3.3-unstable-2024-01-29";
|
|
|
|
meta = with lib; {
|
|
license = licenses.agpl3Plus;
|
|
maintainers = with maintainers; [ davidak ];
|
|
platforms = platforms.all;
|
|
description = "Speech synthesizer based on the concatenation of diphones";
|
|
homepage = "https://github.com/numediart/MBROLA";
|
|
};
|
|
|
|
bin = stdenv.mkDerivation {
|
|
pname = "${pname}-bin";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "numediart";
|
|
repo = "MBROLA";
|
|
rev = "bf17e9e1416a647979ac683657a536e8ca5d880e";
|
|
hash = "sha256-ZjCl1gx/6sGtpXAYO4sAh6dutjwzClQ7kZoq0WaaBlU=";
|
|
};
|
|
|
|
# required for cross compilation
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
env = lib.optionalAttrs stdenv.cc.isGNU {
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
|
|
};
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -D Bin/mbrola $out/bin/mbrola
|
|
rm -rf $out/share/mbrola/voices/*
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = meta // {
|
|
description = "Speech synthesizer based on the concatenation of diphones (binary only)";
|
|
};
|
|
};
|
|
|
|
in
|
|
runCommandLocal "${pname}-${version}"
|
|
{
|
|
inherit pname version meta;
|
|
}
|
|
''
|
|
mkdir -p "$out/share/mbrola"
|
|
ln -s '${mbrola-voices}/data' "$out/share/mbrola/voices"
|
|
ln -s '${bin}/bin' "$out/"
|
|
''
|