Commit 51e07dff authored by Weijia Wang's avatar Weijia Wang
Browse files

clutter: fix build on darwin

parent fb2032f8
Loading
Loading
Loading
Loading
+51 −9
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, pkg-config, libGLU, libGL, libX11, libXext, libXfixes
, libXdamage, libXcomposite, libXi, libxcb, cogl, pango, atk, json-glib
, gobject-introspection, gtk3, gnome, libinput, libgudev, libxkbcommon
{ lib
, stdenv
, fetchurl
, pkg-config
, libGLU
, libGL
, libX11
, libXext
, libXfixes
, libXdamage
, libXcomposite
, libXi
, libxcb
, cogl
, pango
, atk
, json-glib
, gobject-introspection
, gtk3
, gnome
, libinput
, libgudev
, libxkbcommon
}:

let
@@ -19,12 +39,34 @@ stdenv.mkDerivation rec {

  buildInputs = [ gtk3 ];
  nativeBuildInputs = [ pkg-config gobject-introspection ];
  propagatedBuildInputs =
    [ libX11 libGL libGLU libXext libXfixes libXdamage libXcomposite libXi cogl pango
      atk json-glib gobject-introspection libxcb libinput libgudev libxkbcommon
  propagatedBuildInputs = [
    cogl
    pango
    atk
    json-glib
    gobject-introspection
  ] ++ lib.optionals (!stdenv.isDarwin) [
    libX11
    libGL
    libGLU
    libXext
    libXfixes
    libXdamage
    libXcomposite
    libXi
    libxcb
    libinput
    libgudev
    libxkbcommon
  ];

  configureFlags = [ "--enable-introspection" ]; # needed by muffin AFAIK
  configureFlags = [
    "--enable-introspection" # needed by muffin AFAIK
  ] ++ lib.optionals stdenv.isDarwin [
    "--without-x"
    "--enable-x11-backend=no"
    "--enable-quartz-backend=yes"
  ];

  #doCheck = true; # no tests possible without a display

@@ -57,6 +99,6 @@ stdenv.mkDerivation rec {
    homepage = "http://www.clutter-project.org/";

    maintainers = with lib.maintainers; [ ];
    platforms = lib.platforms.mesaPlatforms;
    platforms = lib.platforms.unix;
  };
}