10 audioBackend ? "pulseaudio",
12 assert lib.assertOneOf "audioBackend" audioBackend [
16 stdenv.mkDerivation (finalAttrs: {
27 src = fetchFromGitHub {
30 rev = "v${finalAttrs.version}";
31 hash = "sha256-Tq5pyg3TiQt8CPqGXTyLOaGgaeLTmPp+Duw3+2VAF9g=";
34 # https://github.com/festvox/flite/pull/60.
35 # Replaces `ar` with `$(AR)` in config/common_make_rules.
36 # Improves cross-compilation compatibility.
39 url = "https://github.com/festvox/flite/commit/54c65164840777326bbb83517568e38a128122ef.patch";
40 hash = "sha256-hvKzdX7adiqd9D+9DbnfNdqEULg1Hhqe1xElYxNM1B8=";
44 buildInputs = lib.optional stdenv.hostPlatform.isLinux (
47 pulseaudio = libpulseaudio;
49 .${audioBackend} or (throw "${audioBackend} is not a supported backend!")
54 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "--with-audio=${audioBackend}" ];
56 # main/Makefile creates and removes 'flite_voice_list.c' from multiple targets:
57 # make[1]: *** No rule to make target 'flite_voice_list.c', needed by 'all'. Stop
58 enableParallelBuilding = false;
61 tests.version = testers.testVersion {
62 # `flite` does have a `--version` command, but it returns 1
63 command = "flite --help";
64 package = finalAttrs.finalPackage;
67 updateScript = nix-update-script { };
71 description = "Small, fast run-time speech synthesis engine";
72 homepage = "http://www.festvox.org/flite/";
73 license = lib.licenses.bsdOriginal;
74 maintainers = with lib.maintainers; [ getchoo ];
75 mainProgram = "flite";