about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2007-11-05 08:32:20 +0000
committerMichael Raskin <7c6f434c@mail.ru>2007-11-05 08:32:20 +0000
commit7b1c9a7a82343b693aacd5769e748b7c2f06bff7 (patch)
tree0072be34993d2ff2046d1f11dd8bde4810012208
parent1bc214fd59019aefd60d6ea23c79fdc3293f2845 (diff)
Added Compiz Fusion (main plugins). Also some dependencies, and made wmii build under setup-new-2.sh also.
svn path=/nixpkgs/trunk/; revision=9577
-rw-r--r--pkgs/applications/version-management/git/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix32
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/bcop/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix28
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/ccsm/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix44
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/compiz-manager/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix22
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/compizconfig-python/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix22
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/config-backend/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/default.nix12
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix9
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix22
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/libcompizconfig/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix28
-rw-r--r--pkgs/applications/window-managers/compiz-fusion/main/default.nix2
-rw-r--r--pkgs/applications/window-managers/compiz/0.6.2.nix13
-rw-r--r--pkgs/applications/window-managers/compiz/glx-patch-0.6.2.patch12
-rw-r--r--pkgs/applications/window-managers/wmii/default.nix5
-rw-r--r--pkgs/applications/window-managers/wmii31/default.nix2
-rw-r--r--pkgs/development/interpreters/pyrex/0.9.6.nix21
-rw-r--r--pkgs/development/interpreters/pyrex/default.nix2
-rw-r--r--pkgs/development/libraries/libixp_for_wmii/default.nix2
-rw-r--r--pkgs/development/tools/misc/intltool/0.36.2.nix22
-rw-r--r--pkgs/development/tools/misc/intltool/default.nix2
-rw-r--r--pkgs/lib/default.nix6
-rw-r--r--pkgs/top-level/all-packages.nix50
-rw-r--r--pkgs/top-level/builder-defs.nix62
29 files changed, 420 insertions, 14 deletions
diff --git a/pkgs/applications/version-management/git/default.nix b/pkgs/applications/version-management/git/default.nix
index 1d212d70fc3fa..138b4d6144955 100644
--- a/pkgs/applications/version-management/git/default.nix
+++ b/pkgs/applications/version-management/git/default.nix
@@ -11,6 +11,6 @@ stdenv.mkDerivation {
   buildInputs = [curl openssl zlib expat];
 
   preBuild = "
-    makeFlagsArray=(prefix=$out PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell}/bin/sh)
+    makeFlagsArray=(prefix=$out PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell})
   ";
 }
diff --git a/pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix
new file mode 100644
index 0000000000000..bc239b6dce254
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/bcop/0.6.0.nix
@@ -0,0 +1,32 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://releases.compiz-fusion.org/0.6.0/compiz-bcop-0.6.0.tar.bz2;
+		sha256 = "0hw2ivvw696z325cqy7pmxb8cz30bqh67giw5fg6kzb9sn0x8v8f";
+	};
+		buildInputs = (import ../general-dependencies.nix args);
+		propagatedBuildInputs = [getopt libxslt];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+let 
+	fixPkgconfig = FullDepEntry ("
+		ensureDir \$out/lib
+		ln -fs \$out/share/pkgconfig \$out/lib/pkgconfig
+	") [minInit doMakeInstall defEnsureDir];
+	fixInterpreter = FullDepEntry ("
+		sed -e 's@^#!/bin/bash@#! ${stdenv.bash}/bin/bash@' -i \$out/bin/bcop
+	") [minInit doMakeInstall];
+in
+stdenv.mkDerivation rec {
+	name = "compiz-bcop-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doAutotools doConfigure doMakeInstall fixPkgconfig fixInterpreter doForceShare 
+			doPropagate]);
+	meta = {
+		description = "
+	Compiz BCOP.
+";
+	};
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/bcop/default.nix b/pkgs/applications/window-managers/compiz-fusion/bcop/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/bcop/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix
new file mode 100644
index 0000000000000..019e371b759c8
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/ccsm/0.6.0.nix
@@ -0,0 +1,28 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://releases.compiz-fusion.org/0.6.0/ccsm-0.6.0.tar.bz2;
+		sha256 = "11vv7ljy79szf74bp7wq969aj05p0x785zbiap1jnqlwq1wjkhir";
+	};
+		buildInputs = (import ../general-dependencies.nix args) ++
+			[libcompizconfig bcop compizConfigPython python gettext pygtk 
+			pycairo configBackendGConf];
+		configureFlags = [];
+		wrappedEnv = [
+			"PYTHONPATH" "$(toPythonPath \$out)"
+			"PYTHONPATH" "\$PYTHONPATH"
+			"PYTHONPATH" "$(toPythonPath ${pygtk})/gtk-2.0"
+		];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+stdenv.mkDerivation rec {
+	name = "compizconfig-settings-"+args.version;
+	builder = writeScript (name + "-builder")
+		(textClosure [installPythonPackage (doWrap "\$out/bin/ccsm")]);
+	meta = {
+		description = "
+	Compiz Settings Manager
+";
+	};
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/ccsm/default.nix b/pkgs/applications/window-managers/compiz-fusion/ccsm/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/ccsm/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix
new file mode 100644
index 0000000000000..d0325db7c0c0d
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/compiz-manager/0.6.0.nix
@@ -0,0 +1,44 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://releases.compiz-fusion.org/0.6.0/compiz-manager-0.6.0.tar.bz2;
+		sha256 = "0bjl0kwzl4mc9nw2id8z5q5ikgm8c5zrknn9nm851if005479q3v";
+	};
+		buildInputs = (import ../general-dependencies.nix args) ++
+			[bcop ccsm xvinfo glxinfo xdpyinfo ];
+		shellReplacements = ["compiz-manager" [
+			"COMPIZ_BIN_PATH" "${compiz}/bin/"
+			"PLUGIN_PATH" "/var/run/current-system/sw/share/compiz-plugins/compiz/"
+			"GLXINFO" "${glxinfo}/bin/glxinfo"
+			"KWIN" "/var/run/current-system/sws/bin/kwin"
+			"METACITY" "/var/run/current-system/sws/bin/metacity"
+			"COMPIZ_NAME" "compiz"
+			"FALLBACKWM" "'\''\"\${KWIN}\"'\''"
+			"WHITELIST" "nvidia intel ati radeon i810 i830 i915"
+			"INDIRECT" "yes"
+			"XORG_DRIVER_PATH" "/nix/store/.*"
+		]];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+let
+	install = FullDepEntry ("
+		sed -e '/Checking for texture_from_pixmap:/areturn 0' -i compiz-manager
+		sed -e '/Checking for non power of two support: /areturn 0' -i compiz-manager
+		sed -e '/^\s*$/aPATH=\$PATH:${xvinfo}/bin:${xdpyinfo}/bin' -i compiz-manager
+
+		ensureDir \$out/bin
+		cp compiz-manager \$out/bin
+	") 
+	[minInit doUnpack defEnsureDir];
+in
+stdenv.mkDerivation rec {
+	name = "compiz-manager-"+args.version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doUnpack doReplaceScripts install doPropagate doForceShare]);
+	meta = {
+		description = "
+	Compiz Launch Manager
+";
+	};
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/compiz-manager/default.nix b/pkgs/applications/window-managers/compiz-fusion/compiz-manager/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/compiz-manager/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix
new file mode 100644
index 0000000000000..9b31bfe928ca5
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/0.6.0.nix
@@ -0,0 +1,22 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://releases.compiz-fusion.org/0.6.0.1/compizconfig-python-0.6.0.1.tar.bz2;
+		sha256 = "0im67mxnm30a3xd3rvfwrgfp4ic2x5axpjdahx0f5p9pnfy0jm4n";
+	};
+		buildInputs = (import ../general-dependencies.nix args) ++
+			[libcompizconfig bcop python pyrex];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+stdenv.mkDerivation rec {
+	name = "compizconfig-python-"+args.version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doAutotools doConfigure doMakeInstall doForceShare]);
+	meta = {
+		description = "
+	Compiz configuration - Python part.
+";
+	};
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/default.nix b/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/compizconfig-python/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix
new file mode 100644
index 0000000000000..88fe0ed0b9f3b
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/config-backend/0.6.0.nix
@@ -0,0 +1,22 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://releases.compiz-fusion.org/0.6.0/compizconfig-backend-gconf-0.6.0.tar.bz2;
+		sha256 = "0h0r9sicc4pla5vag0j5qkllyagbs8dv5ai7fga48ln7q35y2mjr";
+	};
+		buildInputs = (import ../general-dependencies.nix args) ++
+			[libcompizconfig bcop];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+stdenv.mkDerivation rec {
+	name = "compizconfig-backend-GConf-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doAutotools doConfigure doMakeInstall doForceShare]);
+	meta = {
+		description = "
+	Compiz configuration backend (GConf).
+";
+	};
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/config-backend/default.nix b/pkgs/applications/window-managers/compiz-fusion/config-backend/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/config-backend/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/applications/window-managers/compiz-fusion/default.nix b/pkgs/applications/window-managers/compiz-fusion/default.nix
new file mode 100644
index 0000000000000..f1bf1ce830892
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/default.nix
@@ -0,0 +1,12 @@
+args : with args;
+rec
+{
+	bcop = import ./bcop args;
+	libcompizconfig = import ./libcompizconfig (args // {inherit bcop;});
+	configBackendGConf = import ./config-backend (args // {inherit libcompizconfig bcop;});
+	compizConfigPython = import ./compizconfig-python (args // {inherit libcompizconfig 
+		bcop pyrex;});
+	ccsm = import ./ccsm (args // {inherit libcompizconfig bcop compizConfigPython configBackendGConf;});
+	pluginsMain = import ./main (args //{inherit bcop ;});
+	compizManager = import ./compiz-manager (args // {inherit bcop ccsm;});
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix b/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix
new file mode 100644
index 0000000000000..1a041eaf2d671
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/general-dependencies.nix
@@ -0,0 +1,9 @@
+/* Ubuntu dependencies
+build-essential libxcomposite-dev libpng12-dev libsm-dev libxrandr-dev libxdamage-dev libxinerama-dev libstartup-notification0-dev libgconf2-dev libgl1-mesa-dev libglu1-mesa-dev libmetacity-dev librsvg2-dev libdbus-1-dev libdbus-glib-1-dev libgnome-desktop-dev libgnome-window-settings-dev gitweb curl autoconf automake automake1.9 libtool intltool libxslt1-dev xsltproc libwnck-dev
+*/
+args: with args;
+[
+	libXcomposite libpng libSM libXrandr libXdamage libXinerama startupnotification 
+	GConf mesa metacity librsvg dbus dbus_glib gnomedesktop git autoconf automake
+	libtool libxslt libwnck intltool perl perlXMLParser compiz
+]
diff --git a/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix
new file mode 100644
index 0000000000000..b3f157abb4b86
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/0.6.0.nix
@@ -0,0 +1,22 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://releases.compiz-fusion.org/0.6.0/libcompizconfig-0.6.0.tar.bz2;
+		sha256 = "1p75p29qg2syk1b4cvkf9ds5qv3h2jnqa6gs38rivbyqqvrcgkij";
+	};
+		buildInputs = (import ../general-dependencies.nix args)++
+			[bcop];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+stdenv.mkDerivation rec {
+	name = "libcompizconfig-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doAutotools doConfigure doMakeInstall doForceShare]);
+	meta = {
+		description = "
+	Compiz configuration backend library.
+";
+	};
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/default.nix b/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/libcompizconfig/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix b/pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix
new file mode 100644
index 0000000000000..757fad07032ad
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/main/0.6.0.nix
@@ -0,0 +1,28 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://releases.compiz-fusion.org/0.6.0/compiz-fusion-plugins-main-0.6.0.tar.bz2;
+		sha256 = "1pn6s8lrzgg2allfp1rdmd6kinx8whnj8sb38aqzirmy1s6gfsvi";
+	};
+		buildInputs = (import ../general-dependencies.nix args)++
+		[bcop libjpeg gettext];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+let
+	sharePlugins = FullDepEntry ("
+		ensureDir \$out/share/compiz-plugins
+		ln -vsf \$out/lib/compiz \$out/share/compiz-plugins
+	") [minInit doMakeInstall defEnsureDir];
+in
+stdenv.mkDerivation rec {
+	name = "compiz-fusion-plugins-main-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doConfigure doMakeInstall sharePlugins doForceShare]);
+	meta = {
+		description = "
+	Main Compiz Fusion plugins.
+";
+	};
+}
diff --git a/pkgs/applications/window-managers/compiz-fusion/main/default.nix b/pkgs/applications/window-managers/compiz-fusion/main/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz-fusion/main/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/applications/window-managers/compiz/0.6.2.nix b/pkgs/applications/window-managers/compiz/0.6.2.nix
index 3b6b26f20f1e6..669e84858b2de 100644
--- a/pkgs/applications/window-managers/compiz/0.6.2.nix
+++ b/pkgs/applications/window-managers/compiz/0.6.2.nix
@@ -9,14 +9,17 @@ args : with args;
 			    pkgconfig libXrender xextproto gtk libwnck GConf libgnome 
 			    libgnomeui metacity gnomegtk glib pango libglade libgtkhtml 
 			    gtkhtml libgnomecanvas libgnomeprint libgnomeprintui gnomepanel 
-			    librsvg fuse
+			    librsvg fuse 
 		];
 		  propagatedBuildInputs = [
 		    libpng libXcomposite libXfixes libXdamage libXrandr libXinerama
 		    libICE libSM startupnotification mesa GConf perl perlXMLParser libxslt
+		    dbus dbus_glib 
 		  ];
 		configureFlags = ["--enable-gtk" "--enable-fuse" 
-			"--enable-annotate" "--enable-librsvg"];
+			"--enable-annotate" "--enable-librsvg"] ++ 
+			(if args ? extraConfigureFlags then args.extraConfigureFlags else []);
+		patches = [ ./glx-patch-0.6.2.patch ];
 	} null; /* null is a terminator for sumArgs */
 	with stringsWithDeps;
 let
@@ -24,14 +27,16 @@ let
     for i in $out/bin/*; do
      patchelf --set-rpath /var/run/opengl-driver/lib:$(patchelf --print-rpath $i) $i
     done
-  ") [minInit doMakeInstall];
+    ensureDir \$out/share/compiz-plugins/
+    ln -sfv \$out/lib/compiz \$out/share/compiz-plugins/
+  ") [minInit doMakeInstall defEnsureDir];
 in
 
 stdenv.mkDerivation 
 rec {
 	name = "compiz-0.6.2";
 	builder = writeScript (name + "-builder")
-		(textClosure [doConfigure doMakeInstall doForceShare postAll]);
+		(textClosure [doPatch doConfigure doMakeInstall doForceShare postAll]);
 	meta = {
 		description = "
 	Compiz window manager
diff --git a/pkgs/applications/window-managers/compiz/glx-patch-0.6.2.patch b/pkgs/applications/window-managers/compiz/glx-patch-0.6.2.patch
new file mode 100644
index 0000000000000..b8b213fb9d89d
--- /dev/null
+++ b/pkgs/applications/window-managers/compiz/glx-patch-0.6.2.patch
@@ -0,0 +1,12 @@
+diff -r -U3 compiz-0.6.2/src/screen.c compiz-0.6.2-mod/src/screen.c
+--- compiz-0.6.2/src/screen.c	2007-10-17 17:12:58.000000000 +0400
++++ compiz-0.6.2-mod/src/screen.c	2007-11-04 01:28:07.000000000 +0300
+@@ -1708,7 +1708,7 @@
+     }
+ 
+     glxExtensions = glXQueryExtensionsString (dpy, screenNum);
+-    if (!strstr (glxExtensions, "GLX_EXT_texture_from_pixmap"))
++    if (/*!strstr (glxExtensions, "GLX_EXT_texture_from_pixmap")*/ 0)
+     {
+ 	compLogMessage (display, "core", CompLogLevelFatal,
+ 			"GLX_EXT_texture_from_pixmap is missing");
diff --git a/pkgs/applications/window-managers/wmii/default.nix b/pkgs/applications/window-managers/wmii/default.nix
index f00df902a8683..a7a4d2973c0bc 100644
--- a/pkgs/applications/window-managers/wmii/default.nix
+++ b/pkgs/applications/window-managers/wmii/default.nix
@@ -8,8 +8,8 @@ args: with args; stdenv.mkDerivation {
 
   buildInputs = [ libX11 libixp ];
   inherit libixp;
- 
-  phases = "installPhase";
+
+  phases = (if args.includeUnpack then "unpackPhase " else "")+"installPhase";
 
   installPhase = "
      export CFLAGS=\$NIX_CFLAGS_COMPILE
@@ -17,6 +17,7 @@ args: with args; stdenv.mkDerivation {
      sed -i -e \"s%^PREFIX.*%PREFIX=\$out%\" \\
             -e \"s%^\\(INCS.*\\)%\\1 \$NIX_CFLAGS_COMPILE%\" \\
             -e \"s%^\\(LIBS.*\\)%\\1 \$LDFLAGS%\" \\
+	    -e 's%^\\(AWKPATH = \\).*%\\1${gawk}/bin/gawk%' \\
             config.mk
      # don't use the default one installed by nixos!
      sed -i -e \"s%ixpc%\$libixp/bin/ixpc%\" wmiir
diff --git a/pkgs/applications/window-managers/wmii31/default.nix b/pkgs/applications/window-managers/wmii31/default.nix
index eb018716a22d5..ff83b78c37b2f 100644
--- a/pkgs/applications/window-managers/wmii31/default.nix
+++ b/pkgs/applications/window-managers/wmii31/default.nix
@@ -9,7 +9,7 @@ args: with args; stdenv.mkDerivation {
   buildInputs = [ libX11 libixp ];
   inherit libixp;
  
-  phases = "installPhase";
+  phases = (if args.includeUnpack then "unpackPhase " else "")+"installPhase";
 
   installPhase = "
      export CFLAGS=\$NIX_CFLAGS_COMPILE
diff --git a/pkgs/development/interpreters/pyrex/0.9.6.nix b/pkgs/development/interpreters/pyrex/0.9.6.nix
new file mode 100644
index 0000000000000..581edf53d6e0a
--- /dev/null
+++ b/pkgs/development/interpreters/pyrex/0.9.6.nix
@@ -0,0 +1,21 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.6.tar.gz;
+		sha256 = "1i0mrv2a3ihnj5mjf07aic7nlps9qap57j477m8ajwhhwx9vwlxy";
+	};
+		buildInputs = [python];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+stdenv.mkDerivation rec {
+	name = "Pyrex-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [installPythonPackage doForceShare]);
+	meta = {
+		description = "
+	Python package compiler or something like that.	
+";
+	};
+}
diff --git a/pkgs/development/interpreters/pyrex/default.nix b/pkgs/development/interpreters/pyrex/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/development/interpreters/pyrex/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/development/libraries/libixp_for_wmii/default.nix b/pkgs/development/libraries/libixp_for_wmii/default.nix
index 7461f76d23502..c26bf7dfc6c0b 100644
--- a/pkgs/development/libraries/libixp_for_wmii/default.nix
+++ b/pkgs/development/libraries/libixp_for_wmii/default.nix
@@ -1,7 +1,7 @@
 args: with args;
 stdenv.mkDerivation {
   name = "libixp_for_wmii";
-  phases = "installPhase";
+  phases = (if args.includeUnpack then "unpackPhase " else "")+"installPhase";
   installPhase = "
 
      export LDFLAGS\=$(echo \$NIX_LDFLAGS | sed -e 's/-rpath/-L/g')
diff --git a/pkgs/development/tools/misc/intltool/0.36.2.nix b/pkgs/development/tools/misc/intltool/0.36.2.nix
new file mode 100644
index 0000000000000..f561813abc190
--- /dev/null
+++ b/pkgs/development/tools/misc/intltool/0.36.2.nix
@@ -0,0 +1,22 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+	fetchurl {
+		url = http://ftp.gnome.org/pub/gnome/sources/intltool/0.36/intltool-0.36.2.tar.bz2;
+		sha256 = "0cfblqz3k5s4rsw6rx9f5v3izsrmrs96293rb7bd02vijbah9gxj";
+	};
+
+		buildInputs = [perl perlXMLParser];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+	with stringsWithDeps;
+stdenv.mkDerivation rec {
+	name = "intltool-0.36.2";
+	builder = writeScript (name + "-builder")
+		(textClosure [doConfigure doMakeInstall doForceShare]);
+	meta = {
+		description = "
+	Internalization tool for XML.
+";
+	};
+}
diff --git a/pkgs/development/tools/misc/intltool/default.nix b/pkgs/development/tools/misc/intltool/default.nix
new file mode 100644
index 0000000000000..c8e4bcf95456a
--- /dev/null
+++ b/pkgs/development/tools/misc/intltool/default.nix
@@ -0,0 +1,2 @@
+args : 
+(import (__toPath ((toString ./JustNothing/.. )+"/"+args.version+".nix"))) args
diff --git a/pkgs/lib/default.nix b/pkgs/lib/default.nix
index d9828a86917ba..bb6f9061467ee 100644
--- a/pkgs/lib/default.nix
+++ b/pkgs/lib/default.nix
@@ -13,6 +13,12 @@ rec {
 	else (innerSumArgs f (x // y)));
   sumArgs = f : innerSumArgs f {};
 
+  innerPairMap = acc: f: l: 
+  	if l == [] then acc else
+	innerPairMap (acc ++ [(f (head l)(head (tail l)))])
+		f (tail (tail l));
+  pairMap = innerPairMap [];
+
   # "Fold" a binary function `op' between successive elements of
   # `list' with `nul' as the starting value, i.e., `fold op nul [x_1
   # x_2 ... x_n] == op x_1 (op x_2 ... (op x_n nul))'.  (This is
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8f5e5494fc8ca..c586475cc054a 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1154,6 +1154,15 @@ rec {
     inherit fetchurl stdenv zlib bzip2;
   };
 
+  pyrexFun = lib.sumArgs (import ../development/interpreters/pyrex) {
+  	inherit fetchurl stdenv stringsWithDeps lib builderDefs;
+	python = python25;
+  };
+
+  pyrex = pyrexFun {
+  	version = "0.9.6";
+  } null;
+
   realPerl = import ../development/interpreters/perl {
     inherit fetchurl stdenv;
   };
@@ -1806,6 +1815,13 @@ rec {
     inherit fetchurl stdenv x11 libjpeg libtiff libungif libpng;
   };
 
+  intltoolFun = lib.sumArgs (import ../development/tools/misc/intltool) {
+  	inherit fetchurl stdenv lib builderDefs stringsWithDeps
+		perl perlXMLParser;
+  };
+
+  intltool = intltoolFun {version = "0.36.2";} null;
+
   lablgtk = import ../development/libraries/lablgtk {
     inherit fetchurl stdenv ocaml pkgconfig;
     inherit (gtkLibs) gtk;
@@ -1987,6 +2003,7 @@ rec {
 
   libixp_for_wmii = lowPrio (import ../development/libraries/libixp_for_wmii {
     inherit fetchurl stdenv;
+    includeUnpack = getConfig ["stdenv" "includeUnpack"] false;
   });
 
   mesaSupported =
@@ -3400,7 +3417,7 @@ rec {
     inherit librsvg fuse;
   };
 
-  compiz = assert mesaSupported; import ../applications/window-managers/compiz {
+  compizFun = lib.sumArgs (assert mesaSupported; import ../applications/window-managers/compiz) {
  	inherit lib builderDefs stringsWithDeps;
     inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt;
     inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
@@ -3413,7 +3430,36 @@ rec {
               libgnomeprintui gnomepanel;
     gnomegtk = gnome.gtk;
     inherit librsvg fuse;
+    inherit dbus dbus_glib;
+  };
+
+  compiz = compizFun {
     version = getConfig ["compiz" "version"] "0.5.0";
+    extraConfigureFlags = getConfig ["compiz" "extraConfigureFlags"] [];
+  } null;
+
+  compizFusion = assert mesaSupported; import ../applications/window-managers/compiz-fusion {
+
+  	version = getConfig ["compizFusion" "version"] "0.6.0" ;
+	inherit compiz;
+
+	inherit stringsWithDeps lib builderDefs;
+
+    inherit fetchurl stdenv pkgconfig libpng mesa perl perlXMLParser libxslt;
+    inherit (xorg) libXcomposite libXfixes libXdamage libXrandr
+      libXinerama libICE libSM libXrender xextproto;
+    inherit (gnome) startupnotification libwnck GConf;
+    inherit (gtkLibs) gtk;
+    inherit (gnome) libgnome libgnomeui metacity
+	      glib pango libglade libgtkhtml gtkhtml
+              libgnomecanvas libgnomeprint
+              libgnomeprintui gnomepanel gnomedesktop;
+    gnomegtk = gnome.gtk;
+    inherit librsvg fuse dbus dbus_glib git;
+ 
+ 	inherit automake autoconf libtool intltool python pyrex gettext;
+	inherit pygtk pycairo getopt libjpeg glxinfo;
+	inherit (xorg) xvinfo xdpyinfo;
   };
   
   compizExtra = import ../applications/window-managers/compiz/extra.nix {
@@ -4001,12 +4047,14 @@ rec {
     libixp = libixp03;
     inherit fetchurl /* fetchhg */ stdenv gawk;
     inherit (xlibs) libX11;
+    includeUnpack = getConfig ["stdenv" "includeUnpack"] false;
   };
 
   wmiiSnap = import ../applications/window-managers/wmii {
     libixp = libixp_for_wmii;
     inherit fetchurl /* fetchhg */ stdenv gawk;
     inherit (xlibs) libX11;
+    includeUnpack = getConfig ["stdenv" "includeUnpack"] false;
   };
 
   wrapFirefox = firefox: import ../applications/networking/browsers/firefox-wrapper {
diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix
index dbedc27c39ab4..33ccc6249d49a 100644
--- a/pkgs/top-level/builder-defs.nix
+++ b/pkgs/top-level/builder-defs.nix
@@ -134,26 +134,80 @@ rec
 		./configure --prefix=\"\$prefix\" ${toString (getAttr ["configureFlags"] "" args)}
 	") [minInit addInputs doUnpack];
 
+	doAutotools = FullDepEntry ("
+		mkdir -p config
+		libtoolize --copy --force
+		aclocal --force
+		#Some packages do not need this
+		autoheader || true; 
+		automake --add-missing --copy
+		autoconf
+	")[minInit addInputs doUnpack];
+
 	doMake = FullDepEntry ("	
 		make ${toString (getAttr ["makeFlags"] "" args)}
 	") [minInit addInputs doUnpack];
 
 	doUnpack = toSrcDir (toString src);
 
+	installPythonPackage = FullDepEntry ("
+		python setup.py install --prefix=\"\$prefix\" 
+		") [minInit addInputs doUnpack];
+
 	doMakeInstall = FullDepEntry ("
 		make ${toString (getAttr ["makeFlags"] "" args)} "+
 			"${toString (getAttr ["installFlags"] "" args)} install") [doMake];
 
 	doForceShare = FullDepEntry (" 
-		ensureDir \$prefix/share
+		ensureDir \"\$prefix/share\"
 		for d in ${toString forceShare}; do
-			if [ -d \$prefix/\$d -a ! -d \$prefix/share/\$d ]; then
-				mv -v \$prefix/\$d \$prefix/share
-				ln -sv share/\$d \$prefix
+			if [ -d \"\$prefix/\$d\" -a ! -d \"\$prefix/share/\$d\" ]; then
+				mv -v \"\$prefix/\$d\" \"\$prefix/share\"
+				ln -sv share/\$d \"\$prefix\"
 			fi;
 		done;
 	") [minInit defEnsureDir];
 
 	doDump = n: noDepEntry "echo Dump number ${n}; set";
 
+	patchFlags = if args ? patchFlags then args.patchFlags else "-p1";
+
+	patches = getAttr ["patches"] [] args;
+
+	toPatchCommand = s: "cat ${toString s} | patch ${toString patchFlags}";
+
+	doPatch = FullDepEntry (concatStringsSep ";"
+		(map toPatchCommand patches)
+	) [minInit doUnpack];
+
+	envAdderInner = s: x: if x==null then s else y: 
+		a: envAdderInner (s+"echo export ${x}='\"'\"\$${x}:${y}\";'\"'\n") a;
+
+	envAdder = envAdderInner "";
+
+	envAdderList = l:  if l==[] then "" else 
+	"echo export ${__head l}='\"'\"\\\$${__head l}:${__head (__tail l)}\"'\"';\n" +
+		envAdderList (__tail (__tail l));
+
+	wrapEnv = cmd: env: "
+		mv \"${cmd}\" \"${cmd}-orig\";
+		touch \"${cmd}\";
+		chmod a+rx \"${cmd}\";
+		(${envAdderList env}
+		echo '\"'\"${cmd}-orig\"'\"' '\"'\\\$@'\"' \n)  > \"${cmd}\"";
+
+	doWrap = cmd: FullDepEntry (wrapEnv cmd (getAttr ["wrappedEnv"] [] args)) [minInit];
+
+	doPropagate = FullDepEntry ("
+		ensureDir \$out/nix-support
+		echo '${toString (getAttr ["propagatedBuildInputs"] [] args)}' >\$out/nix-support/propagated-build-inputs
+	") [minInit defEnsureDir];
+
+	debug = x:(__trace x x);
+	debugX = x:(__trace (__toXML x) x);
+
+	replaceScriptVar = file: name: value: ("sed -e 's`^${name}=.*`${name}='\\''${value}'\\''`' -i ${file}");
+	replaceInScript = file: l: (concatStringsSep "\n" ((pairMap (replaceScriptVar file) l)));
+	replaceScripts = l:(concatStringsSep "\n" (pairMap replaceInScript l));
+	doReplaceScripts = FullDepEntry (replaceScripts (getAttr ["shellReplacements"] [] args)) [minInit];
 }