From 144a7c05b391582b6472ff772b6196a12c756125 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 28 Feb 2007 17:52:41 +0000 Subject: [PATCH] * Build metacity with compositing support. svn path=/nixpkgs/trunk/; revision=8114 --- pkgs/desktops/gnome/default.nix | 11 +++++++---- pkgs/desktops/gnome/metacity.nix | 15 +++++++++++++-- pkgs/development/libraries/libcm/default.nix | 15 +++++++++++++++ pkgs/top-level/all-packages.nix | 9 ++++++--- 4 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/libraries/libcm/default.nix diff --git a/pkgs/desktops/gnome/default.nix b/pkgs/desktops/gnome/default.nix index 5c6c21266d4d..512be33a177f 100644 --- a/pkgs/desktops/gnome/default.nix +++ b/pkgs/desktops/gnome/default.nix @@ -3,7 +3,7 @@ { stdenv, fetchurl, pkgconfig, audiofile , flex, bison, popt, perl, zlib, libxml2, libxslt , perlXMLParser, docbook_xml_dtd_42, gettext, x11, libtiff, libjpeg -, libpng, gtkLibs, libXmu, libXinerama, libXrandr, libXcursor, bzip2 +, libpng, gtkLibs, xlibs, bzip2, libcm }: rec { @@ -172,7 +172,8 @@ rec { gnomepanel = import ./gnome-panel.nix { inherit fetchurl stdenv pkgconfig perl perlXMLParser glib gtk ORBit2 libgnome libgnomeui gnomedesktop libglade libwnck - libjpeg libpng scrollkeeper libXmu; + libjpeg libpng scrollkeeper; + inherit (xlibs) libXmu; input = desktop.gnomepanel; }; @@ -188,8 +189,10 @@ rec { metacity = import ./metacity.nix { inherit stdenv fetchurl pkgconfig perl perlXMLParser glib gtk - GConf startupnotification libXinerama libXrandr libXcursor - gettext; + GConf startupnotification gettext libcm; + inherit (xlibs) libXinerama libXrandr libXcursor + libXcomposite libXfixes libXdamage; + enableCompositor = true; input = desktop.metacity; }; diff --git a/pkgs/desktops/gnome/metacity.nix b/pkgs/desktops/gnome/metacity.nix index 7220595741c4..5d6f0acd5359 100644 --- a/pkgs/desktops/gnome/metacity.nix +++ b/pkgs/desktops/gnome/metacity.nix @@ -1,13 +1,24 @@ { input, stdenv, fetchurl, pkgconfig, perl, perlXMLParser, glib, gtk , GConf, startupnotification, libXinerama, libXrandr, libXcursor , gettext + +, enableCompositor ? false +, libXcomposite ? null, libXfixes ? null, libXdamage ? null, libcm ? null }: +assert enableCompositor -> + libXcomposite != null && libXfixes != null && libXdamage != null && libcm != null; + stdenv.mkDerivation { inherit (input) name src; + buildInputs = [ pkgconfig perl perlXMLParser glib gtk GConf startupnotification libXinerama libXrandr libXcursor gettext - ]; - #configureFlags = "--disable-gconf"; + ] + ++ (if enableCompositor then [libXcomposite libXfixes libXdamage libcm] else []); + + configureFlags = " + ${if enableCompositor then "--enable-compositor" else ""} + "; } diff --git a/pkgs/development/libraries/libcm/default.nix b/pkgs/development/libraries/libcm/default.nix new file mode 100644 index 000000000000..197a1e7fc97b --- /dev/null +++ b/pkgs/development/libraries/libcm/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, pkgconfig, glib, xlibs, mesa}: + +stdenv.mkDerivation { + name = "libcm-0.1.1"; + src = fetchurl { + url = http://ftp.gnome.org/pub/GNOME/sources/libcm/0.1/libcm-0.1.1.tar.bz2; + sha256 = "11i5z8l5v5ffihif35k5j8igj0rahsk4jdmsj24xhdw2s0zx53kn"; + }; + buildInputs = [ + pkgconfig glib xlibs.xlibs xlibs.libXdamage xlibs.libXcomposite + xlibs.libXtst xlibs.inputproto + # !!! inputproto should really be propagated by libXtst + ]; + propagatedBuildInputs = [mesa]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d4ff1631fc87..d290114305e8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1434,6 +1434,11 @@ rec { inherit fetchurl stdenv; }; + libcm = import ../development/libraries/libcm { + inherit fetchurl stdenv pkgconfig xlibs mesa; + inherit (gtkLibs) glib; + }; + libdrm = import ../development/libraries/libdrm { inherit fetchurl stdenv; }; @@ -3010,9 +3015,7 @@ rec { inherit fetchurl stdenv pkgconfig audiofile flex bison popt zlib libxml2 libxslt perl perlXMLParser docbook_xml_dtd_42 gettext x11 - libtiff libjpeg libpng bzip2; - gtkLibs = gtkLibs210; # !!! correct? - inherit (xlibs) libXmu libXinerama libXrandr libXcursor; + libtiff libjpeg libpng gtkLibs xlibs bzip2 libcm; }); kdelibs = import ../desktops/kde/kdelibs {