@@ -2,6 +2,7 @@
2, gstreamer, gst_plugins_base, GConf, setfile
2, gstreamer, gst_plugins_base, GConf, setfile
3, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true
3, withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true
4, withWebKit ? false, webkitgtk2 ? null
4, withWebKit ? false, webkitgtk2 ? null
5+, AGL ? null, Carbon ? null, Cocoa ? null, Kernel ? null, QTKit ? null
@@ -26,10 +27,12 @@ stdenv.mkDerivation {
26 gst_plugins_base GConf ]
27 gst_plugins_base GConf ]
27 ++ optional withMesa mesa
28 ++ optional withMesa mesa
28 ++ optional withWebKit webkitgtk2
29 ++ optional withWebKit webkitgtk2
29− ++ optional stdenv.isDarwin setfile;
30+ ++ optionals stdenv.isDarwin [ setfile Carbon Cocoa Kernel QTKit ];
31 nativeBuildInputs = [ pkgconfig ];
32 nativeBuildInputs = [ pkgconfig ];
34+ propagatedBuildInputs = optional stdenv.isDarwin AGL;
33 configureFlags =
36 configureFlags =
34 [ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl"
37 [ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl"
35 (if compat24 then "--enable-compat24" else "--disable-compat24")
38 (if compat24 then "--enable-compat24" else "--disable-compat24")
@@ -38,7 +41,7 @@ stdenv.mkDerivation {
38 ++ optional withMesa "--with-opengl"
41 ++ optional withMesa "--with-opengl"
39 ++ optionals stdenv.isDarwin
42 ++ optionals stdenv.isDarwin
40 # allow building on 64-bit
43 # allow building on 64-bit
41− [ "--with-cocoa" "--enable-universal-binaries" ]
44+ [ "--with-cocoa" "--enable-universal-binaries" "--with-macosx-version-min=10.7" ]
42 ++ optionals withWebKit
45 ++ optionals withWebKit
43 ["--enable-webview" "--enable-webview-webkit"];
46 ["--enable-webview" "--enable-webview-webkit"];
@@ -52,6 +55,9 @@ stdenv.mkDerivation {
52 substituteInPlace configure --replace \
55 substituteInPlace configure --replace \
53 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
56 'ac_cv_prog_SETFILE="/Developer/Tools/SetFile"' \
54 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
57 'ac_cv_prog_SETFILE="${setfile}/bin/SetFile"'
58+ substituteInPlace configure --replace \
59+ "-framework System" \
57 postInstall = "
63 postInstall = "
@@ -66,6 +72,6 @@ stdenv.mkDerivation {
66 enableParallelBuilding = true;
72 enableParallelBuilding = true;
69− platforms = stdenv.lib.platforms.linux;
75+ platforms = with stdenv.lib.platforms; darwin ++ linux;