From ae74cf3bb5b00801c6b34a0d2a6b809ba0d30355 Mon Sep 17 00:00:00 2001 From: "Yestin L. Harrison" Date: Wed, 20 Jul 2022 20:14:32 -0700 Subject: [PATCH] mpd: fix 0.23.8 on darwin - 0.23.8 includes https://github.com/MusicPlayerDaemon/MPD/commit/c975d8b94316c86bf5950ed3abeba394e1263677 - said change fixes deprecation warnings introduced in the 12.0 sdk, using definitions from the 12.0 sdk - nixpkgs uses 10.12 and 11.0, neither of which are the 12.0 sdk - this will gracefully degrade into a no-op when that changes --- pkgs/servers/mpd/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index 79a84f965bc..82c5ac5ea5d 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -145,6 +145,12 @@ let ] ++ concatAttrVals features_ nativeFeatureDependencies; + postPatch = lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "12.0") '' + substituteInPlace src/output/plugins/OSXOutputPlugin.cxx \ + --replace kAudioObjectPropertyElement{Main,Master} \ + --replace kAudioHardwareServiceDeviceProperty_Virtual{Main,Master}Volume + ''; + # Otherwise, the meson log says: # # Program zip found: NO