git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #34089 from mnacamura/sdl2-darwin-fix

SDL2_{gfx,mixer,net,ttf}: fix Darwin build

commit1fa5c8abaefbd1031b0f35a3971cd03a652b1209 authorDaiderd Jordan <daiderd@gmail.com> dateSun 21 Jan 2018, 00:30 (9 years ago) parent45e47c1bd57ec3
6 files changed+23−13
pkgs/development/libraries/SDL2_gfx/default.nix+4−3 pkgs/development/libraries/SDL2_mixer/default.nix+4−1 pkgs/development/libraries/SDL2_net/default.nix+4−2 pkgs/development/libraries/SDL2_ttf/default.nix+4−3 pkgs/development/libraries/smpeg2/default.nix+4−3 pkgs/top-level/all-packages.nix+3−1
pkgs/development/libraries/SDL2_gfx/default.nix+4−3
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, SDL2 }:
1+{ stdenv, darwin, fetchurl, SDL2 }:
22
33stdenv.mkDerivation rec {
44 name = "SDL2_gfx-${version}";
@@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
99 sha256 = "16jrijzdp095qf416zvj9gs2fqqn6zkyvlxs5xqybd0ip37cp6yn";
1010 };
1111
12− buildInputs = [ SDL2 ];
12+ buildInputs = [ SDL2 ]
13+ ++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
1314
1415 configureFlags = if stdenv.isi686 || stdenv.isx86_64 then "--enable-mmx" else "--disable-mmx";
1516
@@ -38,6 +39,6 @@ stdenv.mkDerivation rec {
3839 license = licenses.zlib;
3940
4041 maintainers = with maintainers; [ bjg ];
41− platforms = platforms.linux;
42+ platforms = platforms.unix;
4243 };
4344}
pkgs/development/libraries/SDL2_mixer/default.nix+4−1
@@ -1,5 +1,6 @@
11{ stdenv, lib, fetchurl, autoreconfHook, pkgconfig, which
22, SDL2, libogg, libvorbis, smpeg2, flac, libmodplug
3+, CoreServices, AudioUnit, AudioToolbox
34, enableNativeMidi ? false, fluidsynth ? null }:
45
56stdenv.mkDerivation rec {
@@ -17,6 +18,8 @@ stdenv.mkDerivation rec {
1718
1819 nativeBuildInputs = [ autoreconfHook pkgconfig which ];
1920
21+ buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices AudioUnit AudioToolbox ];
22+
2023 propagatedBuildInputs = [ SDL2 libogg libvorbis fluidsynth smpeg2 flac libmodplug ];
2124
2225 configureFlags = [ "--disable-music-ogg-shared" ]
@@ -24,7 +27,7 @@ stdenv.mkDerivation rec {
2427
2528 meta = with stdenv.lib; {
2629 description = "SDL multi-channel audio mixer library";
27− platforms = platforms.linux;
30+ platforms = platforms.unix;
2831 homepage = https://www.libsdl.org/projects/SDL_mixer/;
2932 maintainers = with maintainers; [ MP2E ];
3033 license = licenses.zlib;
pkgs/development/libraries/SDL2_net/default.nix+4−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, SDL2 }:
1+{ stdenv, darwin, fetchurl, SDL2 }:
22
33stdenv.mkDerivation rec {
44 name = "SDL2_net-${version}";
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
99 sha256 = "08cxc1bicmyk89kiks7izw1rlx5ng5n6xpy8fy0zxni3b9z8mkhm";
1010 };
1111
12+ buildInputs = stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
13+
1214 propagatedBuildInputs = [ SDL2 ];
1315
1416 meta = with stdenv.lib; {
@@ -16,6 +18,6 @@ stdenv.mkDerivation rec {
1618 homepage = https://www.libsdl.org/projects/SDL_net;
1719 license = licenses.zlib;
1820 maintainers = with maintainers; [ MP2E ];
19− platforms = platforms.linux;
21+ platforms = platforms.unix;
2022 };
2123}
pkgs/development/libraries/SDL2_ttf/default.nix+4−3
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, SDL2, freetype, mesa_noglu }:
1+{ stdenv, darwin, fetchurl, SDL2, freetype, mesa_noglu }:
22
33stdenv.mkDerivation rec {
44 name = "SDL2_ttf-${version}";
@@ -9,11 +9,12 @@ stdenv.mkDerivation rec {
99 sha256 = "0xljwcpvd2knrjdfag5b257xqayplz55mqlszrqp0kpnphh5xnrl";
1010 };
1111
12− buildInputs = [ SDL2 freetype mesa_noglu ];
12+ buildInputs = [ SDL2 freetype mesa_noglu ]
13+ ++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
1314
1415 meta = with stdenv.lib; {
1516 description = "SDL TrueType library";
16− platforms = platforms.linux;
17+ platforms = platforms.unix;
1718 license = licenses.zlib;
1819 homepage = https://www.libsdl.org/projects/SDL_ttf/;
1920 };
pkgs/development/libraries/smpeg2/default.nix+4−3
@@ -1,4 +1,4 @@
1−{ stdenv, fetchsvn, autoconf, automake, libtool, m4, pkgconfig, makeWrapper, SDL2 }:
1+{ stdenv, darwin, fetchsvn, autoconf, automake, libtool, m4, pkgconfig, makeWrapper, SDL2 }:
22
33stdenv.mkDerivation rec {
44 name = "smpeg2-svn${version}";
@@ -17,7 +17,8 @@ stdenv.mkDerivation rec {
1717
1818 nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
1919
20− buildInputs = [ SDL2 ];
20+ buildInputs = [ SDL2 ]
21+ ++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
2122
2223 preConfigure = ''
2324 sh autogen.sh
@@ -37,7 +38,7 @@ stdenv.mkDerivation rec {
3738 homepage = http://icculus.org/smpeg/;
3839 description = "SDL2 MPEG Player Library";
3940 license = licenses.lgpl2;
40− platforms = platforms.linux;
41+ platforms = platforms.unix;
4142 maintainers = with maintainers; [ orivej ];
4243 };
4344}
pkgs/top-level/all-packages.nix+3−1
@@ -10961,7 +10961,9 @@ with pkgs;
1096110961 inherit (darwin.apple_sdk.frameworks) Foundation;
1096210962 };
1096310963
10964− SDL2_mixer = callPackage ../development/libraries/SDL2_mixer { };
10964+ SDL2_mixer = callPackage ../development/libraries/SDL2_mixer {
10965+ inherit (darwin.apple_sdk.frameworks) CoreServices AudioUnit AudioToolbox;
10966+ };
1096510967
1096610968 SDL2_net = callPackage ../development/libraries/SDL2_net { };
1096710969