diff options
Diffstat (limited to 'pkgs/applications/audio/espeak-ng/default.nix')
-rw-r--r-- | pkgs/applications/audio/espeak-ng/default.nix | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/pkgs/applications/audio/espeak-ng/default.nix b/pkgs/applications/audio/espeak-ng/default.nix index 5e62399c8a4..f0aebf4e4a3 100644 --- a/pkgs/applications/audio/espeak-ng/default.nix +++ b/pkgs/applications/audio/espeak-ng/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitHub +, fetchpatch , autoconf , automake , which @@ -15,6 +16,9 @@ , pcaudiolib , sonicSupport ? true , sonic +, CoreAudio +, AudioToolbox +, AudioUnit , alsa-plugins , makeWrapper }: @@ -30,7 +34,13 @@ stdenv.mkDerivation rec { hash = "sha256-aAJ+k+kkOS6k835mEW7BvgAIYGhUHxf7Q4P5cKO8XTk="; }; - patches = lib.optionals mbrolaSupport [ + patches = [ + # Fix build with Clang 16. + (fetchpatch { + url = "https://github.com/espeak-ng/espeak-ng/commit/497c6217d696c1190c3e8b992ff7b9110eb3bedd.patch"; + hash = "sha256-KfzqnRyQfz6nuMKnsHoUzb9rn9h/Pg54mupW1Cr+Zx0="; + }) + ] ++ lib.optionals mbrolaSupport [ # Hardcode correct mbrola paths. (substituteAll { src = ./mbrola.patch; @@ -42,9 +52,20 @@ stdenv.mkDerivation rec { buildInputs = lib.optional mbrolaSupport mbrola ++ lib.optional pcaudiolibSupport pcaudiolib - ++ lib.optional sonicSupport sonic; + ++ lib.optional sonicSupport sonic + ++ lib.optionals stdenv.isDarwin [ + CoreAudio + AudioToolbox + AudioUnit + ]; - preConfigure = "./autogen.sh"; + # touch ChangeLog to avoid below error on darwin: + # Makefile.am: error: required file './ChangeLog.md' not found + preConfigure = lib.optionalString stdenv.isDarwin '' + touch ChangeLog + '' + '' + ./autogen.sh + ''; configureFlags = [ "--with-mbrola=${if mbrolaSupport then "yes" else "no"}" |