summary refs log tree commit diff
path: root/pkgs/development/libraries/clutter/default.nix
blob: 804aa13ed91a9cf43d577d8ec1cd531e89e4b9af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{ 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
  pname = "clutter";
  version = "1.26.4";
in
stdenv.mkDerivation rec {
  name = "${pname}-${version}";

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
    sha256 = "1rn4cd1an6a9dfda884aqpcwcgq8dgydpqvb19nmagw4b70zlj4b";
  };

  outputs = [ "out" "dev" ];

  buildInputs = [ gtk3 ];
  nativeBuildInputs = [ pkg-config gobject-introspection ];
  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
  ] ++ lib.optionals stdenv.isDarwin [
    "--without-x"
    "--enable-x11-backend=no"
    "--enable-quartz-backend=yes"
  ];

  env = lib.optionalAttrs stdenv.cc.isClang {
    NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
  };

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

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
      versionPolicy = "odd-unstable";
    };
  };

  meta = {
    description = "Library for creating fast, dynamic graphical user interfaces";

    longDescription =
      '' Clutter is free software library for creating fast, compelling,
         portable, and dynamic graphical user interfaces.  It is a core part
         of MeeGo, and is supported by the open source community.  Its
         development is sponsored by Intel.

         Clutter uses OpenGL for rendering (and optionally OpenGL|ES for use
         on mobile and embedded platforms), but wraps an easy to use,
         efficient, flexible API around GL's complexity.

         Clutter enforces no particular user interface style, but provides a
         rich, generic foundation for higher-level toolkits tailored to
         specific needs.
      '';

    license = lib.licenses.lgpl2Plus;
    homepage = "http://www.clutter-project.org/";

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