diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/mbrola/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/audio/mbrola/default.nix | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/nixpkgs/pkgs/applications/audio/mbrola/default.nix b/nixpkgs/pkgs/applications/audio/mbrola/default.nix index a21495027c86..6cc20269dcf3 100644 --- a/nixpkgs/pkgs/applications/audio/mbrola/default.nix +++ b/nixpkgs/pkgs/applications/audio/mbrola/default.nix @@ -1,4 +1,4 @@ -{ stdenv, stdenvNoCC, lib, symlinkJoin, fetchFromGitHub }: +{ stdenv, lib, fetchFromGitHub, runCommandLocal }: let pname = "mbrola"; @@ -7,31 +7,19 @@ let meta = with lib; { license = licenses.agpl3Plus; maintainers = with maintainers; [ davidak ]; - platforms = platforms.linux; + platforms = platforms.all; description = "Speech synthesizer based on the concatenation of diphones"; homepage = "https://github.com/numediart/MBROLA"; }; - voices = stdenvNoCC.mkDerivation { - pname = "${pname}-voices"; - inherit version; - - src = fetchFromGitHub { - owner = "numediart"; - repo = "MBROLA-voices"; - rev = "fe05a0ccef6a941207fd6aaad0b31294a1f93a51"; # using latest commit - sha256 = "1w0y2xjp9rndwdjagp2wxh656mdm3d6w9cs411g27rjyfy1205a0"; - }; - - dontBuild = true; - installPhase = '' - runHook preInstall - install -d $out/share/mbrola/voices - cp -R $src/data/* $out/share/mbrola/voices/ - runHook postInstall - ''; - dontFixup = true; + # Very big (0.65 G) so kept as a fixed-output derivation to limit "duplicates". + voices = fetchFromGitHub { + owner = "numediart"; + repo = "MBROLA-voices"; + rev = "fe05a0ccef6a941207fd6aaad0b31294a1f93a51"; # using latest commit + sha256 = "1w0y2xjp9rndwdjagp2wxh656mdm3d6w9cs411g27rjyfy1205a0"; + name = "${pname}-voices-${version}"; meta = meta // { description = "Speech synthesizer based on the concatenation of diphones (voice files)"; homepage = "https://github.com/numediart/MBROLA-voices"; @@ -65,8 +53,14 @@ let }; in -symlinkJoin { - inherit pname version meta; - name = "${pname}-${version}"; - paths = [ bin voices ]; -} + runCommandLocal + "${pname}-${version}" + { + inherit pname version meta; + } + '' + mkdir -p "$out/share/mbrola" + ln -s '${voices}/data' "$out/share/mbrola/voices" + ln -s '${bin}/bin' "$out/" + '' + |