summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2007-12-31 08:49:41 +0000
committerMichael Raskin <7c6f434c@mail.ru>2007-12-31 08:49:41 +0000
commitfa272cab1405ea1e4fda7deb759ba6b8e919dcdd (patch)
tree3a67c3b5e95b8b668daf222d5cb32a63eb9d8ebc
parenta98161a0da8825541d0c8b8dbde6056300542053 (diff)
downloadnixpkgs-fa272cab1405ea1e4fda7deb759ba6b8e919dcdd.tar
nixpkgs-fa272cab1405ea1e4fda7deb759ba6b8e919dcdd.tar.gz
nixpkgs-fa272cab1405ea1e4fda7deb759ba6b8e919dcdd.tar.bz2
nixpkgs-fa272cab1405ea1e4fda7deb759ba6b8e919dcdd.tar.lz
nixpkgs-fa272cab1405ea1e4fda7deb759ba6b8e919dcdd.tar.xz
nixpkgs-fa272cab1405ea1e4fda7deb759ba6b8e919dcdd.tar.zst
nixpkgs-fa272cab1405ea1e4fda7deb759ba6b8e919dcdd.zip
Fixed bridge-utils, added qemu, tuned builder-defs unpack, added xlaunch - a tool to launch X using everything possible from the job except slim.
svn path=/nixpkgs/trunk/; revision=9985
-rw-r--r--pkgs/applications/virtualization/qemu/0.9.0.nix26
-rw-r--r--pkgs/applications/virtualization/qemu/linux-img/0.2.nix27
-rw-r--r--pkgs/applications/virtualization/virtualbox/1.5.2.nix21
-rw-r--r--pkgs/os-specific/linux/bridge_utils/default.nix2
-rw-r--r--pkgs/tools/X11/xlaunch/default.nix14
-rw-r--r--pkgs/top-level/all-packages.nix39
-rw-r--r--pkgs/top-level/builder-defs.nix12
7 files changed, 140 insertions, 1 deletions
diff --git a/pkgs/applications/virtualization/qemu/0.9.0.nix b/pkgs/applications/virtualization/qemu/0.9.0.nix
new file mode 100644
index 00000000000..8604f5ae66b
--- /dev/null
+++ b/pkgs/applications/virtualization/qemu/0.9.0.nix
@@ -0,0 +1,26 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+		fetchurl {
+			url = http://fabrice.bellard.free.fr/qemu/qemu-0.9.0.tar.gz;
+			sha256 = "1h85njd8xvn472yhcm92rjyzqjr719ab73rxwmz9cm2n6gwsq7s9";
+		};
+
+		buildInputs = [ SDL zlib which ];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+let 
+preConfigure = FullDepEntry ("
+  gcc --version
+") [minInit];
+in
+stdenv.mkDerivation rec {
+	name = "qemu-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [ preConfigure doConfigure doMakeInstall doForceShare doPropagate]);
+	meta = {
+		description = "
+		QEmu processor emulator.
+";
+	};
+}
diff --git a/pkgs/applications/virtualization/qemu/linux-img/0.2.nix b/pkgs/applications/virtualization/qemu/linux-img/0.2.nix
new file mode 100644
index 00000000000..02ac87ef2e2
--- /dev/null
+++ b/pkgs/applications/virtualization/qemu/linux-img/0.2.nix
@@ -0,0 +1,27 @@
+
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+		fetchurl {
+			url = http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2;
+			sha256 = "08xlwy1908chpc4fsqy2v13zi25dapk0ybrd43fj95v67kdj5hj1";
+		};
+		buildInputs = [];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+let 
+doCopy = FullDepEntry ("
+  ensureDir \$out/share/qemu-images
+  cp linux-${version}.img  \$out/share/qemu-images/
+") [minInit doUnpack defEnsureDir];
+in
+stdenv.mkDerivation rec {
+	name = "QEmu-Linux-Image-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doCopy doForceShare doPropagate]);
+	meta = {
+		description = "
+		${abort "Write a description"}
+";
+	};
+}
diff --git a/pkgs/applications/virtualization/virtualbox/1.5.2.nix b/pkgs/applications/virtualization/virtualbox/1.5.2.nix
new file mode 100644
index 00000000000..e633c55a263
--- /dev/null
+++ b/pkgs/applications/virtualization/virtualbox/1.5.2.nix
@@ -0,0 +1,21 @@
+args : with args;
+	with builderDefs {
+		src = /* put a fetchurl here */
+		fetchurl {
+			url = http://www.virtualbox.org/download/1.5.2/VirtualBox-1.5.2_OSE.tar.bz2;
+			sha256 = "1g9rvkqjcsfx36gwk6i9c0bml6053xx2mdn1sn7vyyy0sgwkwk53";
+		};
+		buildInputs = [libXcursor bridge_utils umlutilities kernelHeaders 
+		      wine jre libxslt libIDL SDL qt3 openssl zlib];
+		configureFlags = [];
+	} null; /* null is a terminator for sumArgs */
+stdenv.mkDerivation rec {
+	name = "VirtualBox-"+version;
+	builder = writeScript (name + "-builder")
+		(textClosure [doConfigure doMakeInstall doForceShare doPropagate]);
+	meta = {
+		description = "
+		Virtual Box is just software for running virtual machines. 
+";
+	};
+}
diff --git a/pkgs/os-specific/linux/bridge_utils/default.nix b/pkgs/os-specific/linux/bridge_utils/default.nix
index a54e52b11c9..9763e28915d 100644
--- a/pkgs/os-specific/linux/bridge_utils/default.nix
+++ b/pkgs/os-specific/linux/bridge_utils/default.nix
@@ -3,7 +3,7 @@ args.stdenv.mkDerivation {
   name = "bridge-utils-1.2";
 
   src = args.fetchurl {
-    url = http://mirror/sourceforge/bridge/bridge-utils-1.2.tar.gz;
+    url = mirror://sourceforge/bridge/bridge-utils-1.2.tar.gz;
     sha256 = "0jg3z51c2c34byg4zi39j9g4b66js5kanjhid77hpa0jdfmryfy9";
   };
 
diff --git a/pkgs/tools/X11/xlaunch/default.nix b/pkgs/tools/X11/xlaunch/default.nix
new file mode 100644
index 00000000000..4f229da8abb
--- /dev/null
+++ b/pkgs/tools/X11/xlaunch/default.nix
@@ -0,0 +1,14 @@
+args: with args;
+stdenv.mkDerivation {
+	name = "xlaunch";
+	inherit xorgserver;
+	buildCommand = "
+		mkdir -p \$out/bin
+		echo '
+			(egrep \"^\\s+env\" /etc/event.d/xserver | sed -e s/env// ; echo X;) | bash &
+			sleep 15; 
+			\"$@\";
+		' >\$out/bin/xlaunch
+		chmod a+x \$out/bin/xlaunch
+	";
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 820960443db..393c46f3076 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4306,6 +4306,28 @@ rec {
     python = python_alts.v_2_5;
   };
 
+  qemuFun = lib.sumArgs (selectVersion ../applications/virtualization/qemu ) {
+    inherit fetchurl;
+    stdenv = overrideGCC stdenv gcc34;
+    builderDefs = builderDefs {
+      stdenv = (overrideGCC stdenv gcc34)//{gcc=gcc34;};
+    };
+    inherit SDL zlib which;
+  };
+
+  qemu = qemuFun {
+    version = "0.9.0";
+  } null;
+
+  qemuImageFun = lib.sumArgs 
+    (selectVersion ../applications/virtualization/qemu/linux-img ) {
+    inherit builderDefs fetchurl stdenv;
+  };
+
+  qemuImage = qemuImageFun {
+    version = "0.2";
+  } null;
+
   ratpoison = import ../applications/window-managers/ratpoison {
     inherit fetchurl stdenv fontconfig readline;
     inherit (xlibs) libX11 inputproto libXt libXpm libXft
@@ -4490,6 +4512,17 @@ rec {
     flags = [ "X11" ]; # only flag "X11" by now
   };
 
+  /*virtualboxFun = lib.sumArgs (selectVersion ../applications/virtualization/virtualbox) {
+    inherit stdenv fetchurl builderDefs bridge_utils umlutilities kernelHeaders 
+      wine jre libxslt SDL qt3 openssl zlib;
+    inherit (xorg) libXcursor;
+    inherit (gnome) libIDL;
+  };
+
+  virtualbox = virtualboxFun {
+    version = "1.5.2";
+  } null;*/
+
   vlc = import ../applications/video/vlc {
     inherit fetchurl stdenv perl x11 wxGTK
             zlib mpeg2dec a52dec libmad ffmpeg
@@ -4590,6 +4623,11 @@ rec {
     inherit (xlibs) libXaw xproto libXt libX11 libSM libICE;
   };
 
+  xlaunch = import ../tools/X11/xlaunch {
+    inherit stdenv;
+    inherit (xorg) xorgserver;
+  };
+
   xmacro = import ../tools/X11/xmacro {
     inherit fetchurl stdenv;
     inherit (xlibs) libX11 libXi 
@@ -4601,6 +4639,7 @@ rec {
     inherit (xlibs) libX11 libXi imake libXau;
     inherit (xorg) xauth;
   };
+
   xvidcap = import ../applications/video/xvidcap {
     inherit fetchurl stdenv perl perlXMLParser pkgconfig;
     inherit (gtkLibs) gtk;
diff --git a/pkgs/top-level/builder-defs.nix b/pkgs/top-level/builder-defs.nix
index 2de180c9c47..155743558d9 100644
--- a/pkgs/top-level/builder-defs.nix
+++ b/pkgs/top-level/builder-defs.nix
@@ -14,6 +14,10 @@ args: with args; with stringsWithDeps; with lib;
 		else if (hasSuffixHack ".zip" s) || (hasSuffixHack ".ZIP" s) then "zip"
 		else if (hasSuffixHack "-cvs-export" s) then "cvs-dir"
 		else if (hasSuffixHack ".nar.bz2" s) then "narbz2"
+
+		# Last block - for single files!! It should be always after .tar.*
+		else if (hasSuffixHack ".bz2" s) then "plain-bz2"
+
 		else (abort "unknown archive type : ${s}"));
 
 	defAddToSearchPath = FullDepEntry ("
@@ -184,6 +188,11 @@ args: with args; with stringsWithDeps; with lib;
 	" else if (archiveType s) == "narbz2" then "
 		bzip2 <${s} | nix-store --restore \$PWD/\$(basename ${s} .nar.bz2)
 		cd \$(basename ${s} .nar.bz2)
+	" else if (archiveType s) == "plain-bz2" then "
+		mkdir \$PWD/\$(basename ${s} .bz2)
+		NAME=\$(basename ${s} .bz2)
+		bzip2 -d <${s} > \$PWD/\$(basename ${s} .bz2)/\${NAME#*-}
+		cd \$(basename ${s} .bz2)
 	" else (abort "unknown archive type : ${s}"))+
 		(if args ? goSrcDir then args.goSrcDir else "")
 	) [minInit];
@@ -300,4 +309,7 @@ args: with args; with stringsWithDeps; with lib;
 	makeFlags = if useConfig then autoMakeFlags else getAttr ["makeFlags"] "" args;
 
 	inherit lib;
+
+	surroundWithCommands = x : before : after : {deps=x.deps; text = before + "\n" +
+		x.text + "\n" + after ;};
 }) // args