1{ lib, stdenv, fetchFromGitHub
2, libtool, pkg-config, automake, autoconf, intltool
3, glib, gobject-introspection, gtk2, gtk-doc
4, clutter, clutter-gtk
5}:
6
7stdenv.mkDerivation rec {
8 pname = "libmx";
9 version = "1.4.7";
10
11 src = fetchFromGitHub {
12 owner = "clutter-project";
13 repo = "mx";
14 rev = version;
15 sha256 = "sha256-+heIPSkg3d22xsU48UOTJ9FPLXC7zLivcnabQOM9aEk=";
16 };
17
18 # remove the following superfluous checks
19 preConfigure = ''
20 substituteInPlace "autogen.sh" \
21 --replace '`which intltoolize`' '"x"' \
22 --replace '`which gtkdocize`' '"x"' \
23 --replace '`which autoreconf`' '"x"'
24 '';
25
26 configureFlags = [ "--enable-introspection"
27 "--without-startup-notification"
28 "--without-dbus"
29 "--without-glade"
30 "--without-clutter-imcontext"
31 "--without-clutter-gesture"
32 ];
33
34 configureScript = "sh autogen.sh";
35
36 nativeBuildInputs = [ pkg-config automake autoconf intltool ];
37 buildInputs = [
38 libtool
39 gobject-introspection glib
40 gtk2 gtk-doc clutter clutter-gtk
41 ];
42
43 # patch to resolve GL errors
44 # source : https://github.com/clutter-project/mx/pull/62
45 preBuild = ''
46 sed -i 's/GLushort/gushort/g' mx/mx-deform-texture.c
47 sed -i 's/GLfloat/gfloat/g' mx/mx-texture-frame.c
48 '';
49
50 meta = with lib; {
51 homepage = "http://www.clutter-project.org/";
52 description = "A Clutter-based toolkit";
53 longDescription =
54 ''Mx is a widget toolkit using Clutter that provides a set of standard
55 interface elements, including buttons, progress bars, scroll bars and
56 others. It also implements some standard managers. One other interesting
57 feature is the possibility setting style properties from a CSS format
58 file.'';
59 license = licenses.lgpl21;
60 maintainers = with maintainers; [ cstrahan ];
61 platforms = with platforms; linux;
62 };
63}