summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2021-12-23 16:52:21 -0500
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2021-12-23 16:52:21 -0500
commit2d571be5e4cedd247d3c469ce4d81c28c83e9e54 (patch)
treed7402ea3a7c0e1faa9f2e51e6643cf07e56857ae
parenta14356187f00be3c934a21543bed82d3beb8d640 (diff)
downloadnixpkgs-2d571be5e4cedd247d3c469ce4d81c28c83e9e54.tar
nixpkgs-2d571be5e4cedd247d3c469ce4d81c28c83e9e54.tar.gz
nixpkgs-2d571be5e4cedd247d3c469ce4d81c28c83e9e54.tar.bz2
nixpkgs-2d571be5e4cedd247d3c469ce4d81c28c83e9e54.tar.lz
nixpkgs-2d571be5e4cedd247d3c469ce4d81c28c83e9e54.tar.xz
nixpkgs-2d571be5e4cedd247d3c469ce4d81c28c83e9e54.tar.zst
nixpkgs-2d571be5e4cedd247d3c469ce4d81c28c83e9e54.zip
rdmidi: fix build on darwin
-rw-r--r--pkgs/development/libraries/audio/rtmidi/default.nix3
-rw-r--r--pkgs/development/libraries/audio/rtmidi/macos_include_targetconditionals.patch13
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/libraries/audio/rtmidi/default.nix b/pkgs/development/libraries/audio/rtmidi/default.nix
index 6c75b9866e8..2ba981ae46e 100644
--- a/pkgs/development/libraries/audio/rtmidi/default.nix
+++ b/pkgs/development/libraries/audio/rtmidi/default.nix
@@ -42,6 +42,9 @@ stdenv.mkDerivation rec {
       url = "https://github.com/thestk/rtmidi/pull/230/commits/892fe5492f0e787484fa4a37027b08c265ce001f.patch";
       sha256 = "0ca9m42xa3gmycimzvzvl67wa266xq9pfp1b4v555rh2fp52kbcj";
     })
+
+    # https://github.com/thestk/rtmidi/pull/277
+    ./macos_include_targetconditionals.patch
   ];
 
   postPatch = ''
diff --git a/pkgs/development/libraries/audio/rtmidi/macos_include_targetconditionals.patch b/pkgs/development/libraries/audio/rtmidi/macos_include_targetconditionals.patch
new file mode 100644
index 00000000000..58eaf5f490b
--- /dev/null
+++ b/pkgs/development/libraries/audio/rtmidi/macos_include_targetconditionals.patch
@@ -0,0 +1,13 @@
+diff -ru a/RtMidi.cpp b/RtMidi.cpp
+--- a/RtMidi.cpp	2021-12-23 16:46:33.000000000 -0500
++++ b/RtMidi.cpp	2021-12-23 16:48:19.000000000 -0500
+@@ -39,6 +39,9 @@
+ 
+ #include "RtMidi.h"
+ #include <sstream>
++#if defined(__APPLE__)
++#include <TargetConditionals.h>
++#endif
+ 
+ #if defined(__MACOSX_CORE__)
+   #if TARGET_OS_IPHONE