Merge pull request #261272 from abathur/espeakng_darwin

pcaudiolib, espeak-ng: fix darwin builds
This commit is contained in:
Weijia Wang 2023-10-16 17:18:57 +02:00 committed by GitHub
commit ed57521e5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 5 deletions

View file

@ -15,6 +15,9 @@
, pcaudiolib
, sonicSupport ? true
, sonic
, CoreAudio
, AudioToolbox
, AudioUnit
, alsa-plugins
, makeWrapper
}:
@ -42,9 +45,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"}"

View file

@ -38,7 +38,11 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optional stdenv.isLinux alsa-lib
++ lib.optional pulseaudioSupport libpulseaudio;
preConfigure = ''
# 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
'';
@ -48,6 +52,5 @@ stdenv.mkDerivation (finalAttrs: {
license = licenses.gpl3Plus;
maintainers = with maintainers; [ aske ];
platforms = platforms.unix;
badPlatforms = platforms.darwin;
};
})

View file

@ -31377,7 +31377,9 @@ with pkgs;
espeak-classic = callPackage ../applications/audio/espeak { };
espeak-ng = callPackage ../applications/audio/espeak-ng { };
espeak-ng = callPackage ../applications/audio/espeak-ng {
inherit (darwin.apple_sdk.frameworks) AudioToolbox AudioUnit CoreAudio;
};
espeak = res.espeak-ng;
espeakedit = callPackage ../applications/audio/espeak/edit.nix { };