1 { stdenv, lib, fetchFromGitHub, runCommandLocal, mbrola-voices }:
8 license = licenses.agpl3Plus;
9 maintainers = with maintainers; [ davidak ];
10 platforms = platforms.all;
11 description = "Speech synthesizer based on the concatenation of diphones";
12 homepage = "https://github.com/numediart/MBROLA";
15 bin = stdenv.mkDerivation {
16 pname = "${pname}-bin";
19 src = fetchFromGitHub {
23 sha256 = "1w86gv6zs2cbr0731n49z8v6xxw0g8b0hzyv2iqb9mqcfh38l8zy";
26 # required for cross compilation
27 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
29 env = lib.optionalAttrs stdenv.cc.isGNU {
30 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
35 install -D Bin/mbrola $out/bin/mbrola
36 rm -rf $out/share/mbrola/voices/*
41 description = "Speech synthesizer based on the concatenation of diphones (binary only)";
49 inherit pname version meta;
52 mkdir -p "$out/share/mbrola"
53 ln -s '${mbrola-voices}/data' "$out/share/mbrola/voices"
54 ln -s '${bin}/bin' "$out/"