lol

Merge pull request #261329 from abathur/speech_tools_darwin

speech-tools: fix darwin build

authored by

Weijia Wang and committed by
GitHub
905705a2 733302ed

+33 -4
+30 -3
pkgs/development/libraries/speech-tools/default.nix
··· 1 - { lib, stdenv, fetchurl, alsa-lib, ncurses }: 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , fetchpatch 5 + , ncurses 6 + , alsa-lib 7 + , CoreServices 8 + , AudioUnit 9 + , Cocoa 10 + }: 2 11 3 12 stdenv.mkDerivation rec { 4 13 pname = "speech_tools"; ··· 9 18 sha256 = "1k2xh13miyv48gh06rgsq2vj25xwj7z6vwq9ilsn8i7ig3nrgzg4"; 10 19 }; 11 20 12 - buildInputs = [ alsa-lib ncurses ]; 21 + patches = [ 22 + # Fix build on Apple Silicon. Remove in the next release. 23 + (fetchpatch { 24 + url = "https://github.com/festvox/speech_tools/commit/06141f69d21bf507a9becb5405265dc362edb0df.patch"; 25 + hash = "sha256-tRestCBuRhak+2ccsB6mvDxGm/TIYX4eZ3oppCOEP9s="; 26 + }) 27 + ]; 28 + 29 + buildInputs = [ 30 + ncurses 31 + ] ++ lib.optionals stdenv.isLinux [ 32 + alsa-lib 33 + ] ++ lib.optionals stdenv.isDarwin [ 34 + CoreServices 35 + AudioUnit 36 + Cocoa 37 + ]; 38 + 39 + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" ]; 13 40 14 41 # Workaround build failure on -fno-common toolchains: 15 42 # ld: libestools.a(editline.o):(.bss+0x28): multiple definition of ··· 42 69 meta = with lib; { 43 70 description = "Text-to-speech engine"; 44 71 maintainers = with maintainers; [ raskin ]; 45 - platforms = platforms.linux; 72 + platforms = platforms.unix; 46 73 license = licenses.free; 47 74 }; 48 75
+3 -1
pkgs/top-level/all-packages.nix
··· 25111 25111 25112 25112 speechd = callPackage ../development/libraries/speechd { }; 25113 25113 25114 - speech-tools = callPackage ../development/libraries/speech-tools { }; 25114 + speech-tools = callPackage ../development/libraries/speech-tools { 25115 + inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit Cocoa; 25116 + }; 25115 25117 25116 25118 speex = callPackage ../development/libraries/speex { 25117 25119 fftw = fftwFloat;