git.iko.soy/typeable/nixpkgs
on master help sign in
SDL2_{gfx,mixer,net,ttf}: fix Darwin build
commit4014b24ca167a087384b0ccbed88df4538dcc577 authorMitsuhiro Nakamura <m.nacamura@gmail.com> dateSun 21 Jan 2018, 00:26 (9 years ago) parenta97eaae
6 files changed+23−11
pkgs/development/libraries/SDL2_gfx/default.nix+4−2 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−2 pkgs/development/libraries/smpeg2/default.nix+4−3 pkgs/top-level/all-packages.nix+3−1
pkgs/development/libraries/SDL2_gfx/default.nix+4−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, SDL2 }:
1+{ stdenv, darwin, fetchurl, SDL2 }:
22
33stdenv.mkDerivation rec {
44 name = "SDL2_gfx-${version}";
@@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
99 sha256 = "16jrijzdp095qf416zvj9gs2fqqn6zkyvlxs5xqybd0ip37cp6yn";
1010 };
1111
12+ nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
13+
1214 buildInputs = [ SDL2 ];
1315
1416 configureFlags = if stdenv.isi686 || stdenv.isx86_64 then "--enable-mmx" else "--disable-mmx";
@@ -38,6 +40,6 @@ stdenv.mkDerivation rec {
3840 license = licenses.zlib;
3941
4042 maintainers = with maintainers; [ bjg ];
41− platforms = platforms.linux;
43+ platforms = platforms.unix;
4244 };
4345}
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+ nativeBuildInputs = 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−2
@@ -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,13 @@ stdenv.mkDerivation rec {
99 sha256 = "0xljwcpvd2knrjdfag5b257xqayplz55mqlszrqp0kpnphh5xnrl";
1010 };
1111
12+ nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
13+
1214 buildInputs = [ SDL2 freetype mesa_noglu ];
1315
1416 meta = with stdenv.lib; {
1517 description = "SDL TrueType library";
16− platforms = platforms.linux;
18+ platforms = platforms.unix;
1719 license = licenses.zlib;
1820 homepage = https://www.libsdl.org/projects/SDL_ttf/;
1921 };
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}";
@@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
1515 ./sdl2.patch
1616 ];
1717
18− nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ];
18+ nativeBuildInputs = [ autoconf automake pkgconfig makeWrapper ]
19+ ++ stdenv.lib.optional stdenv.isDarwin darwin.libobjc;
1920
2021 buildInputs = [ SDL2 ];
2122
@@ -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