portaudio: apple-sdk migration (#353078)

This commit is contained in:
Emily 2024-11-05 16:53:08 +00:00 committed by GitHub
commit 62cc8b3978
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 29 deletions

View File

@ -31,24 +31,10 @@
, qtnetworkauth
, qttools
, nixosTests
, darwin
, apple-sdk_11
}:
let
stdenv' = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
# portaudio propagates Darwin frameworks. Rebuild it using the 11.0 stdenv
# from Qt and the 11.0 SDK frameworks.
portaudio' = if stdenv.hostPlatform.isDarwin then portaudio.override {
stdenv = stdenv';
inherit (darwin.apple_sdk_11_0.frameworks)
AudioUnit
AudioToolbox
CoreAudio
CoreServices
Carbon
;
} else portaudio;
in stdenv'.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
pname = "musescore";
version = "4.4.3";
@ -116,7 +102,7 @@ in stdenv'.mkDerivation (finalAttrs: {
libpulseaudio
libsndfile
libvorbis
portaudio'
portaudio
portmidi
flac
libopusenc
@ -132,7 +118,7 @@ in stdenv'.mkDerivation (finalAttrs: {
alsa-lib
qtwayland
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk_11_0.frameworks.Cocoa
apple-sdk_11
];
postInstall = ''

View File

@ -5,11 +5,7 @@
, libjack2
, pkg-config
, which
, AudioUnit
, AudioToolbox
, CoreAudio
, CoreServices
, Carbon }:
}:
stdenv.mkDerivation rec {
pname = "portaudio";
@ -22,14 +18,14 @@ stdenv.mkDerivation rec {
strictDeps = true;
nativeBuildInputs = [ pkg-config which ];
buildInputs = [ libjack2 ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform alsa-lib) [ alsa-lib ];
buildInputs =
[ libjack2 ]
++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform alsa-lib) [ alsa-lib ];
configureFlags = [ "--disable-mac-universal" "--enable-cxx" ];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=nullability-inferred-on-nested-type -Wno-error=nullability-completeness-on-arrays -Wno-error=implicit-const-int-float-conversion";
propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ AudioUnit AudioToolbox CoreAudio CoreServices Carbon ];
# Disable parallel build as it fails as:
# make: *** No rule to make target '../../../lib/libportaudio.la',
# needed by 'libportaudiocpp.la'. Stop.

View File

@ -22371,9 +22371,7 @@ with pkgs;
popt = callPackage ../development/libraries/popt { };
portaudio = callPackage ../development/libraries/portaudio {
inherit (darwin.apple_sdk.frameworks) AudioToolbox AudioUnit CoreAudio CoreServices Carbon;
};
portaudio = callPackage ../development/libraries/portaudio { };
portmidi = callPackage ../development/libraries/portmidi {
inherit (darwin.apple_sdk.frameworks) Carbon CoreAudio CoreFoundation CoreMIDI CoreServices;