@@ -2,6 +2,7 @@
22, gstreamer, gst_plugins_base, GConf, setfile
33, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true
44, withWebKit ? false, webkitgtk2 ? null
5+, AGL ? null, Carbon ? null, Cocoa ? null, Kernel ? null, QTKit ? null
56}:
67
78
@@ -26,10 +27,12 @@ stdenv.mkDerivation {
2627 gst_plugins_base GConf ]
2728 ++ optional withMesa mesa
2829 ++ optional withWebKit webkitgtk2
29− ++ optional stdenv.isDarwin setfile;
30+ ++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ];
3031
3132 nativeBuildInputs = [ pkgconfig ];
3233
34+ propagatedBuildInputs = optional stdenv.isDarwin AGL;
35+
3336 configureFlags =
3437 [ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl"
3538 (if compat24 then "--enable-compat24" else "--disable-compat24")
@@ -38,7 +41,7 @@ stdenv.mkDerivation {
3841 ++ optional withMesa "--with-opengl"
3942 ++ optionals stdenv.isDarwin
4043 # allow building on 64-bit
41− [ "--with-cocoa" "--enable-universal-binaries" ]
44+ [ "--with-cocoa" "--enable-universal-binaries" "--with-macosx-version-min=10.7" ]
4245 ++ optionals withWebKit
4346 ["--enable-webview" "--enable-webview-webkit"];
4447
@@ -52,6 +55,9 @@ stdenv.mkDerivation {
5255 substituteInPlace configure --replace \
5356 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
5457 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
58+ substituteInPlace configure --replace \
59+ "-framework System" \
60+ -lSystem
5561 '';
5662
5763 postInstall = "
@@ -66,6 +72,6 @@ stdenv.mkDerivation {
6672 enableParallelBuilding = true;
6773
6874 meta = {
69− platforms = stdenv.lib.platforms.linux;
75+ platforms = with stdenv.lib.platforms; darwin ++ linux;
7076 };
7177}