about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/compiz
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/window-managers/compiz')
-rw-r--r--pkgs/applications/window-managers/compiz/0.8.0.nix44
-rw-r--r--pkgs/applications/window-managers/compiz/bcop.nix17
-rw-r--r--pkgs/applications/window-managers/compiz/ccsm.nix31
-rw-r--r--pkgs/applications/window-managers/compiz/config-python.nix20
-rw-r--r--pkgs/applications/window-managers/compiz/core.nix37
-rw-r--r--pkgs/applications/window-managers/compiz/extra.nix17
-rw-r--r--pkgs/applications/window-managers/compiz/libcompizconfig.nix22
-rw-r--r--pkgs/applications/window-managers/compiz/plugindir-core.patch39
-rw-r--r--pkgs/applications/window-managers/compiz/plugindir-libcompizconfig.patch39
-rw-r--r--pkgs/applications/window-managers/compiz/plugins-extra.nix30
-rw-r--r--pkgs/applications/window-managers/compiz/plugins-main.nix22
-rw-r--r--pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch58
12 files changed, 315 insertions, 61 deletions
diff --git a/pkgs/applications/window-managers/compiz/0.8.0.nix b/pkgs/applications/window-managers/compiz/0.8.0.nix
deleted file mode 100644
index 40215b2b5495..000000000000
--- a/pkgs/applications/window-managers/compiz/0.8.0.nix
+++ /dev/null
@@ -1,44 +0,0 @@
-args : with args;
-rec {
-  src = fetchurl {
-      url = "http://releases.compiz-fusion.org/core/compiz-0.8.0.tar.gz";
-      sha256 = "0xhyilfz2cfbdwni774b54171addjqw7hda6j6snzxb1igny7iry";
-    };
-
-  buildInputs = [
-    pkgconfig gtk libwnck GConf libgnome
-    libgnomeui metacity gnomegtk glib pango libglade libgtkhtml
-    gtkhtml libgnomecanvas libgnomeprint libgnomeprintui gnomepanel
-    librsvg fuse gettext intltool binutils
-  ];
-  propagatedBuildInputs = [
-    libpng libXcomposite libXfixes libXdamage libXrandr libXinerama
-    libICE libSM startupnotification mesa GConf perl perlXMLParser libxslt
-    dbus.libs dbus_glib compositeproto fixesproto damageproto randrproto
-    xineramaproto renderproto kbproto xextproto libXrender xproto libX11
-    libxcb
-  ];
-
-  postAll = fullDepEntry ("
-    for i in $out/bin/*; do
-     patchelf --set-rpath /var/run/opengl-driver/lib:$(patchelf --print-rpath $i) $i
-    done
-    ensureDir \$out/share/compiz-plugins/
-    ln -sfv \$out/lib/compiz \$out/share/compiz-plugins/
-  ") ["minInit" "doMakeInstall" "defEnsureDir"];
-
-  configureFlags = ["--enable-gtk" "--enable-fuse"
-          "--enable-annotate" "--enable-librsvg"] ++
-          (if args ? extraConfigureFlags then args.extraConfigureFlags else []);
-
-  /* doConfigure should be specified separately */
-  phaseNames = [ "doPatch" "doConfigure" "doMakeInstall" "doPropagate"
-			"doForceShare" "postAll" ];
-
-  name = "compiz-0.8.0";
-
-  meta = {
-          description = "Compiz window manager";
-          inherit src;
-  };
-}
diff --git a/pkgs/applications/window-managers/compiz/bcop.nix b/pkgs/applications/window-managers/compiz/bcop.nix
new file mode 100644
index 000000000000..254393d4c7fc
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/bcop.nix
@@ -0,0 +1,17 @@
+{ stdenv, fetchurl, pkgconfig, libxslt }:
+
+stdenv.mkDerivation rec {
+  name = "compiz-bcop-0.8.4";
+
+  src = fetchurl {
+    url = "http://releases.compiz.org/components/compiz-bcop/${name}.tar.bz2";
+    sha256 = "0kwcvalmx2aab7j3x7s0xqm102i3kr5gh1z8mfws9q4qkqdclnfk";
+  };
+
+  buildInputs = [ pkgconfig libxslt ];
+    
+  meta = {
+    homepage = http://www.compiz.org/;
+    description = "Code generator for Compiz plugins";
+  };
+}
diff --git a/pkgs/applications/window-managers/compiz/ccsm.nix b/pkgs/applications/window-managers/compiz/ccsm.nix
new file mode 100644
index 000000000000..0406a170d190
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/ccsm.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl, makeWrapper, intltool, gtk
+, python, pygtk, pygobject, pycairo, compizconfig_python }:
+
+stdenv.mkDerivation rec {
+  name = "ccsm-0.8.4";
+
+  src = fetchurl {
+    url = "http://releases.compiz.org/components/ccsm/${name}.tar.bz2";
+    sha256 = "0vf16a2nmb0qwwxymvgl86nkfscj3n39jdw2q2p737pj5h1xmfa6";
+  };
+
+  buildInputs = [ makeWrapper python intltool gtk ];
+
+  buildPhase = "python setup.py build --prefix=$out";
+
+  pythonDeps = [ pygtk pygobject pycairo compizconfig_python ];
+
+  installPhase =
+    ''
+      python setup.py install --prefix=$out
+
+      wrapProgram $out/bin/ccsm --prefix PYTHONPATH ":" \
+          "$(toPythonPath "$pythonDeps $out")"
+    '';
+    
+  meta = {
+    homepage = http://www.compiz.org/;
+    description = "Compiz settings manager";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/window-managers/compiz/config-python.nix b/pkgs/applications/window-managers/compiz/config-python.nix
new file mode 100644
index 000000000000..4de7fb41a488
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/config-python.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, pkgconfig, xlibs, libcompizconfig, glib
+, python, pyrex }:
+
+stdenv.mkDerivation rec {
+  name = "compizconfig-python-0.8.4";
+
+  src = fetchurl {
+    url = "http://releases.compiz.org/components/compizconfig-python/${name}.tar.bz2";
+    sha256 = "0nkgqxddjw324aymzcy5nx6ilhfbpk9rra4qbzrq3l39xqsswd37";
+  };
+
+  buildInputs = [ pkgconfig libcompizconfig glib python pyrex xlibs.xlibs ];
+
+  NIX_LDFLAGS = "-lcompizconfig";
+
+  meta = {
+    homepage = http://www.compiz.org/;
+    description = "Python interface to the Compiz configuration";
+  };
+}
diff --git a/pkgs/applications/window-managers/compiz/core.nix b/pkgs/applications/window-managers/compiz/core.nix
new file mode 100644
index 000000000000..ef5279613d09
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/core.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, intltool, pkgconfig, xlibs, mesa, libxml2, libxslt
+, libstartup_notification, libpng, glib, gtk, gnome, dbus_glib, librsvg, bzip2 }:
+
+let version = "0.8.6"; in
+
+stdenv.mkDerivation {
+  name = "compiz-${version}";
+
+  src = fetchurl {
+    url = "http://releases.compiz.org/${version}/compiz-${version}.tar.bz2";
+    sha256 = "132gmdawjmrmvazm31h3r3wwq97h58hz17yyc9sa6q2nkfsnkpy4";
+  };
+
+  patches =
+    [ # Allow the path to the Compiz plugin library and metadata
+      # directories to be overriden through $COMPIZ_PLUGINDIR and
+      # $COMPIZ_METADATADIR, respectively.
+      ./plugindir-core.patch
+    ];
+
+  buildInputs =
+    [ intltool pkgconfig libpng glib
+      gtk gnome.libwnck gnome.GConf dbus_glib librsvg bzip2
+    ];
+
+  propagatedBuildInputs =
+    [ xlibs.xlibs xlibs.libXfixes xlibs.libXrandr xlibs.libXrender
+      xlibs.libXdamage xlibs.libXcomposite xlibs.libXinerama
+      libstartup_notification mesa libxml2 libxslt 
+    ];
+
+  meta = {
+    homepage = http://www.compiz.org/;
+    description = "A compositing window manager";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/window-managers/compiz/extra.nix b/pkgs/applications/window-managers/compiz/extra.nix
deleted file mode 100644
index 70f4e5dd8c38..000000000000
--- a/pkgs/applications/window-managers/compiz/extra.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, compiz, perl, perlXMLParser, GConf, dbus, gtk
-}:
-
-stdenv.mkDerivation {
-  name = "compiz-extra-20070305";
-  src = fetchurl {
-    url = http://gandalfn.club.fr/ubuntu/compiz-extra/compiz-extra-latest.tar.bz2;
-    sha256 = "7fc7faafccfdf22dea7ac1de6629dcb55ec63d84fcb57a14559309cf284fa94f";
-  };
-  buildInputs = [
-    pkgconfig compiz perl perlXMLParser GConf dbus.libs gtk
-  ];
-  preBuild = "
-    makeFlagsArray=(moduledir=$out/lib/compiz)
-  ";
-  preConfigure = "touch m4/Makefile.in";
-}
diff --git a/pkgs/applications/window-managers/compiz/libcompizconfig.nix b/pkgs/applications/window-managers/compiz/libcompizconfig.nix
new file mode 100644
index 000000000000..51d459e7a366
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/libcompizconfig.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl,intltool, pkgconfig, xlibs, libxml2, libxslt, compiz }:
+
+stdenv.mkDerivation rec {
+  name = "libcompizconfig-0.8.4";
+
+  src = fetchurl {
+    url = "http://releases.compiz.org/components/libcompizconfig/${name}.tar.bz2";
+    sha256 = "0adhl2nc2zrswl5n4a8ipymffq6yjwnxgpkv6rsk7sqvby9kwca1";
+  };
+
+  patches =
+    [ # See ./core.nix.
+      ./plugindir-libcompizconfig.patch
+    ];
+
+  buildInputs = [ pkgconfig intltool xlibs.libX11 compiz libxml2 libxslt ];
+
+  meta = {
+    homepage = http://www.compiz.org/;
+    description = "Compiz configuration library";
+  };
+}
diff --git a/pkgs/applications/window-managers/compiz/plugindir-core.patch b/pkgs/applications/window-managers/compiz/plugindir-core.patch
new file mode 100644
index 000000000000..5a242e66088f
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/plugindir-core.patch
@@ -0,0 +1,39 @@
+diff -ru -x '*~' compiz-0.8.6-orig/src/metadata.c compiz-0.8.6/src/metadata.c
+--- compiz-0.8.6-orig/src/metadata.c	2010-03-28 14:15:35.000000000 +0200
++++ compiz-0.8.6/src/metadata.c	2010-10-20 00:22:47.000000000 +0200
+@@ -146,7 +146,7 @@
+ compAddMetadataFromFile (CompMetadata *metadata,
+ 			 const char   *file)
+ {
+-    char *home;
++    char *home, *metadatadir;
+     Bool status = FALSE;
+ 
+     home = getenv ("HOME");
+@@ -163,7 +163,10 @@
+ 	}
+     }
+ 
+-    status |= addMetadataFromFilename (metadata, METADATADIR, file);
++    metadatadir = getenv("COMPIZ_METADATADIR");
++    if (!metadatadir) metadatadir = METADATADIR;
++
++    status |= addMetadataFromFilename (metadata, metadatadir, file);
+     if (!status)
+     {
+ 	compLogMessage ("core", CompLogLevelWarn,
+diff -ru -x '*~' compiz-0.8.6-orig/src/plugin.c compiz-0.8.6/src/plugin.c
+--- compiz-0.8.6-orig/src/plugin.c	2010-03-28 14:15:35.000000000 +0200
++++ compiz-0.8.6/src/plugin.c	2010-10-20 00:25:16.000000000 +0200
+@@ -579,7 +579,10 @@
+ 	}
+     }
+ 
+-    status = (*loaderLoadPlugin) (p, PLUGINDIR, name);
++    plugindir = getenv("COMPIZ_PLUGINDIR");
++    if (!plugindir) plugindir = PLUGINDIR;
++
++    status = (*loaderLoadPlugin) (p, plugindir, name);
+     if (status)
+ 	return p;
+ 
diff --git a/pkgs/applications/window-managers/compiz/plugindir-libcompizconfig.patch b/pkgs/applications/window-managers/compiz/plugindir-libcompizconfig.patch
new file mode 100644
index 000000000000..207816a3c518
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/plugindir-libcompizconfig.patch
@@ -0,0 +1,39 @@
+diff -ru -x '*~' libcompizconfig-0.8.4-orig/src/compiz.cpp libcompizconfig-0.8.4/src/compiz.cpp
+--- libcompizconfig-0.8.4-orig/src/compiz.cpp	2009-10-14 02:36:04.000000000 +0200
++++ libcompizconfig-0.8.4/src/compiz.cpp	2010-10-20 00:35:28.000000000 +0200
+@@ -3004,7 +3004,10 @@
+ 	    }
+ 	}
+ 
+-	loadPluginFromXMLFile (context, xmlName, (char *) METADATADIR);
++        char *metadatadir = getenv("COMPIZ_METADATADIR");
++        if (!metadatadir) metadatadir = METADATADIR;
++
++	loadPluginFromXMLFile (context, xmlName, metadatadir);
+ 	free (xmlName);
+     }
+ 
+@@ -3031,7 +3034,10 @@
+ 	    free (homeplugins);
+ 	}
+     }
+-    loadPluginsFromXMLFiles (context, (char *)METADATADIR);
++    
++    char *metadatadir = getenv("COMPIZ_METADATADIR");
++    if (!metadatadir) metadatadir = METADATADIR;
++    loadPluginsFromXMLFiles (context, metadatadir);
+ 
+     if (home && strlen (home))
+     {
+@@ -3043,7 +3049,10 @@
+ 	    free (homeplugins);
+ 	}
+     }
+-    loadPluginsFromName (context, (char *)PLUGINDIR);
++
++    char *plugindir = getenv("COMPIZ_PLUGINDIR");
++    if (!plugindir) plugindir = PLUGINDIR;
++    loadPluginsFromName (context, plugindir);
+ }
+ 
+ static void
diff --git a/pkgs/applications/window-managers/compiz/plugins-extra.nix b/pkgs/applications/window-managers/compiz/plugins-extra.nix
new file mode 100644
index 000000000000..8852ebd474ed
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/plugins-extra.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, intltool, pkgconfig, compiz, compiz_bcop
+, compiz_plugins_main, getopt, libjpeg, cairo, pango, gnome }:
+
+let version = "0.8.6"; in
+
+stdenv.mkDerivation rec {
+  name = "compiz-plugins-extra-${version}";
+
+  src = fetchurl {
+    url = "http://releases.compiz.org/${version}/${name}.tar.bz2";
+    sha256 = "1qbxfi332bbadm0ah48frnrl9dkczl111s5a91a0cqz5v7nbw4g1";
+  };
+
+  patches =
+    [ # Support scaling wallpapers to the maximum size while still
+      # respecting the aspect ratio.
+      ./wallpaper-maxpect.patch
+    ];
+
+  NIX_CFLAGS_COMPILE = "-I${compiz_plugins_main}/include/compiz";
+
+  buildInputs =
+    [ intltool pkgconfig compiz compiz_bcop compiz_plugins_main getopt gnome.GConf ];
+
+  meta = {
+    homepage = http://www.compiz.org/;
+    description = "Extra plugins for Compiz";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/window-managers/compiz/plugins-main.nix b/pkgs/applications/window-managers/compiz/plugins-main.nix
new file mode 100644
index 000000000000..ea1c01e7414b
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/plugins-main.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, intltool, pkgconfig, compiz, compiz_bcop
+, getopt, libjpeg, cairo, pango, gnome }:
+
+let version = "0.8.6"; in
+
+stdenv.mkDerivation rec {
+  name = "compiz-plugins-main-${version}";
+
+  src = fetchurl {
+    url = "http://releases.compiz.org/${version}/${name}.tar.bz2";
+    sha256 = "1nfn3r4q7wvzfkdh9hrm5zc816xa8cs2s7cliz0fmnqikcs4zp36";
+  };
+
+  buildInputs =
+    [ intltool pkgconfig compiz compiz_bcop getopt libjpeg cairo pango gnome.GConf ];
+
+  meta = {
+    homepage = http://www.compiz.org/;
+    description = "Main plugins for Compiz";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch b/pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch
new file mode 100644
index 000000000000..8130dff1dba4
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/wallpaper-maxpect.patch
@@ -0,0 +1,58 @@
+diff -x '*~' -ru compiz-plugins-extra-0.8.6-orig/metadata/wallpaper.xml.in compiz-plugins-extra-0.8.6/metadata/wallpaper.xml.in
+--- compiz-plugins-extra-0.8.6-orig/metadata/wallpaper.xml.in	2010-03-29 16:09:17.000000000 +0200
++++ compiz-plugins-extra-0.8.6/metadata/wallpaper.xml.in	2010-10-21 00:23:18.000000000 +0200
+@@ -24,7 +24,7 @@
+ 					<_long>Image position.</_long>
+ 					<type>int</type>
+ 					<min>0</min>
+-					<max>4</max>
++					<max>5</max>
+ 					<desc>
+ 						<value>0</value>
+ 						<_name>Scale and Crop</_name>
+@@ -45,6 +45,10 @@
+ 						<value>4</value>
+ 						<_name>Center Tiled</_name>
+ 					</desc>
++					<desc>
++						<value>5</value>
++						<_name>Centered Maxpect</_name>
++					</desc>
+ 				</option>
+ 				<option name="bg_fill_type" type="list">
+ 					<_short>Fill type</_short>
+diff -x '*~' -ru compiz-plugins-extra-0.8.6-orig/src/wallpaper/wallpaper.c compiz-plugins-extra-0.8.6/src/wallpaper/wallpaper.c
+--- compiz-plugins-extra-0.8.6-orig/src/wallpaper/wallpaper.c	2010-03-29 16:09:18.000000000 +0200
++++ compiz-plugins-extra-0.8.6/src/wallpaper/wallpaper.c	2010-10-21 01:09:10.000000000 +0200
+@@ -697,12 +697,12 @@
+ 	    tmpMatrix = back->imgTex.matrix;
+ 
+ 
+-	    if (back->imagePos == BgImagePosScaleAndCrop)
++	    if ((back->imagePos == BgImagePosScaleAndCrop) || (back->imagePos == BgImagePosCenteredMaxpect))
+ 	    {
+ 		s1 = (float) s->width / back->width;
+ 		s2 = (float) s->height / back->height;
+ 		
+-		s1 = MAX (s1, s2);
++		s1 = back->imagePos == BgImagePosScaleAndCrop ? MAX (s1, s2) : MIN (s1, s2);
+ 
+ 		tmpMatrix.xx /= s1;
+ 		tmpMatrix.yy /= s1;
+@@ -711,6 +711,16 @@
+ 		tmpMatrix.x0 -= x * tmpMatrix.xx;
+ 		y = (s->height - ((int)back->height * s1)) / 2.0;
+ 		tmpMatrix.y0 -= y * tmpMatrix.yy;
++
++                if (back->imagePos == BgImagePosCenteredMaxpect)
++                {
++                    reg = &tmpRegion;
++		
++                    tmpRegion.extents.x1 = MAX (0, x);
++                    tmpRegion.extents.y1 = MAX (0, y);
++                    tmpRegion.extents.x2 = MIN (s->width, x + ((int) back->width * s1));
++                    tmpRegion.extents.y2 = MIN (s->height, y + ((int) back->height * s1));
++                }
+ 	    }
+ 	    else if (back->imagePos == BgImagePosScaled)
+ 	    {