summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-01-21 00:30:36 +0100
committerGitHub <noreply@github.com>2018-01-21 00:30:36 +0100
commit1fa5c8abaefbd1031b0f35a3971cd03a652b1209 (patch)
treeb7d53ceffa3f79ea818cf46e8fa391a4b983ffea
parent45e47c14bee731f49c0110c4fa19a92833164031 (diff)
parentbd57ec3870aedd8ab3df131bb1518c40ebc6c77a (diff)
downloadnixlib-1fa5c8abaefbd1031b0f35a3971cd03a652b1209.tar
nixlib-1fa5c8abaefbd1031b0f35a3971cd03a652b1209.tar.gz
nixlib-1fa5c8abaefbd1031b0f35a3971cd03a652b1209.tar.bz2
nixlib-1fa5c8abaefbd1031b0f35a3971cd03a652b1209.tar.lz
nixlib-1fa5c8abaefbd1031b0f35a3971cd03a652b1209.tar.xz
nixlib-1fa5c8abaefbd1031b0f35a3971cd03a652b1209.tar.zst
nixlib-1fa5c8abaefbd1031b0f35a3971cd03a652b1209.zip
Merge pull request #34089 from mnacamura/sdl2-darwin-fix
SDL2_{gfx,mixer,net,ttf}: fix Darwin build
-rw-r--r--pkgs/development/libraries/SDL2_gfx/default.nix7
-rw-r--r--pkgs/development/libraries/SDL2_mixer/default.nix5
-rw-r--r--pkgs/development/libraries/SDL2_net/default.nix6
-rw-r--r--pkgs/development/libraries/SDL2_ttf/default.nix7
-rw-r--r--pkgs/development/libraries/smpeg2/default.nix7
-rw-r--r--pkgs/top-level/all-packages.nix4
6 files changed, 23 insertions, 13 deletions
diff --git a/pkgs/development/libraries/SDL2_gfx/default.nix b/pkgs/development/libraries/SDL2_gfx/default.nix
index a7ef0290734b..a630e9cead8a 100644
--- a/pkgs/development/libraries/SDL2_gfx/default.nix
+++ b/pkgs/development/libraries/SDL2_gfx/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, SDL2 }:
+{ stdenv, darwin, fetchurl, SDL2 }:
 
 stdenv.mkDerivation rec {
   name = "SDL2_gfx-${version}";
@@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "16jrijzdp095qf416zvj9gs2fqqn6zkyvlxs5xqybd0ip37cp6yn";
   };
 
-  buildInputs = [ SDL2 ];
+  buildInputs = [ SDL2 ]
+    ++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
 
   configureFlags = if stdenv.isi686 || stdenv.isx86_64 then "--enable-mmx" else "--disable-mmx";
 
@@ -38,6 +39,6 @@ stdenv.mkDerivation rec {
     license = licenses.zlib;
 
     maintainers = with maintainers; [ bjg ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/SDL2_mixer/default.nix b/pkgs/development/libraries/SDL2_mixer/default.nix
index 6eada0c83e52..00251adb9153 100644
--- a/pkgs/development/libraries/SDL2_mixer/default.nix
+++ b/pkgs/development/libraries/SDL2_mixer/default.nix
@@ -1,5 +1,6 @@
 { stdenv, lib, fetchurl, autoreconfHook, pkgconfig, which
 , SDL2, libogg, libvorbis, smpeg2, flac, libmodplug
+, CoreServices, AudioUnit, AudioToolbox
 , enableNativeMidi ? false, fluidsynth ? null }:
 
 stdenv.mkDerivation rec {
@@ -17,6 +18,8 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ autoreconfHook pkgconfig which ];
 
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
+
   propagatedBuildInputs = [ SDL2 libogg libvorbis fluidsynth smpeg2 flac libmodplug ];
 
   configureFlags = [ "--disable-music-ogg-shared" ]
@@ -24,7 +27,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "SDL multi-channel audio mixer library";
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     homepage = https://www.libsdl.org/projects/SDL_mixer/;
     maintainers = with maintainers; [ MP2E ];
     license = licenses.zlib;
diff --git a/pkgs/development/libraries/SDL2_net/default.nix b/pkgs/development/libraries/SDL2_net/default.nix
index cf81fc0cac83..780444d51f4f 100644
--- a/pkgs/development/libraries/SDL2_net/default.nix
+++ b/pkgs/development/libraries/SDL2_net/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, SDL2 }:
+{ stdenv, darwin, fetchurl, SDL2 }:
 
 stdenv.mkDerivation rec {
   name = "SDL2_net-${version}";
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
     sha256 = "08cxc1bicmyk89kiks7izw1rlx5ng5n6xpy8fy0zxni3b9z8mkhm";
   };
 
+  buildInputs = stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
+
   propagatedBuildInputs = [ SDL2 ];
 
   meta = with stdenv.lib; {
@@ -16,6 +18,6 @@ stdenv.mkDerivation rec {
     homepage = https://www.libsdl.org/projects/SDL_net;
     license = licenses.zlib;
     maintainers = with maintainers; [ MP2E ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/SDL2_ttf/default.nix b/pkgs/development/libraries/SDL2_ttf/default.nix
index 010ca46695a3..87436119ef47 100644
--- a/pkgs/development/libraries/SDL2_ttf/default.nix
+++ b/pkgs/development/libraries/SDL2_ttf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, SDL2, freetype, mesa_noglu }:
+{ stdenv, darwin, fetchurl, SDL2, freetype, mesa_noglu }:
 
 stdenv.mkDerivation rec {
   name = "SDL2_ttf-${version}";
@@ -9,11 +9,12 @@ stdenv.mkDerivation rec {
     sha256 = "0xljwcpvd2knrjdfag5b257xqayplz55mqlszrqp0kpnphh5xnrl";
   };
 
-  buildInputs = [ SDL2 freetype mesa_noglu ];
+  buildInputs = [ SDL2 freetype mesa_noglu ]
+    ++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
 
   meta = with stdenv.lib; {
     description = "SDL TrueType library";
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     license = licenses.zlib;
     homepage = https://www.libsdl.org/projects/SDL_ttf/;
   };
diff --git a/pkgs/development/libraries/smpeg2/default.nix b/pkgs/development/libraries/smpeg2/default.nix
index 10386a7b33e4..3207bdb3a7f2 100644
--- a/pkgs/development/libraries/smpeg2/default.nix
+++ b/pkgs/development/libraries/smpeg2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchsvn, autoconf, automake, libtool, m4, pkgconfig, makeWrapper, SDL2 }:
+{ stdenv, darwin, fetchsvn, autoconf, automake, libtool, m4, pkgconfig, makeWrapper, SDL2 }:
 
 stdenv.mkDerivation rec {
   name = "smpeg2-svn${version}";
@@ -17,7 +17,8 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
 
-  buildInputs = [ SDL2 ];
+  buildInputs = [ SDL2 ]
+    ++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
 
   preConfigure = ''
     sh autogen.sh
@@ -37,7 +38,7 @@ stdenv.mkDerivation rec {
     homepage = http://icculus.org/smpeg/;
     description = "SDL2 MPEG Player Library";
     license = licenses.lgpl2;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ orivej ];
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1bb89e9b67c7..8db63bcd3c7d 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10961,7 +10961,9 @@ with pkgs;
     inherit (darwin.apple_sdk.frameworks) Foundation;
   };
 
-  SDL2_mixer = callPackage ../development/libraries/SDL2_mixer { };
+  SDL2_mixer = callPackage ../development/libraries/SDL2_mixer {
+    inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit AudioToolbox;
+  };
 
   SDL2_net = callPackage ../development/libraries/SDL2_net { };