2011-10-01 16:15:47 +02:00
|
|
|
{ stdenv, fetchurl, attr, zlib, SDL, alsaLib, pkgconfig, pciutils, libuuid, vde2
|
2011-08-29 15:39:25 +02:00
|
|
|
, libjpeg, libpng, ncurses, python, glib }:
|
2011-06-17 23:23:12 +02:00
|
|
|
|
2009-08-04 18:02:27 +02:00
|
|
|
assert stdenv.isLinux;
|
2011-06-17 23:23:12 +02:00
|
|
|
|
2009-08-04 18:02:27 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2011-10-19 22:41:15 +02:00
|
|
|
name = "qemu-kvm-0.15.1";
|
2011-05-13 14:10:33 +02:00
|
|
|
|
2009-08-04 18:02:27 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/kvm/${name}.tar.gz";
|
2011-10-19 22:41:15 +02:00
|
|
|
sha256 = "0gkk96yid3nq8i4z8xbiarj0r9v7b2zavf5mnh0rc7kclzxa7mmf";
|
2009-08-04 18:02:27 +02:00
|
|
|
};
|
|
|
|
|
2010-10-18 20:47:05 +02:00
|
|
|
patches = [ ./smb-tmpdir.patch ];
|
2009-08-05 19:26:39 +02:00
|
|
|
|
2011-07-18 17:28:51 +02:00
|
|
|
configureFlags = "--audio-drv-list=alsa";
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2011-06-17 23:23:12 +02:00
|
|
|
buildInputs =
|
2011-10-01 16:15:47 +02:00
|
|
|
[ attr zlib SDL alsaLib pkgconfig pciutils libuuid vde2 libjpeg libpng
|
2011-08-29 15:39:25 +02:00
|
|
|
ncurses python glib
|
2011-06-17 23:23:12 +02:00
|
|
|
];
|
2009-08-04 18:02:27 +02:00
|
|
|
|
|
|
|
preBuild =
|
|
|
|
''
|
|
|
|
# Don't use a hardcoded path to Samba.
|
|
|
|
substituteInPlace ./net.h --replace /usr/sbin/smbd smbd
|
|
|
|
'';
|
2011-06-17 23:23:12 +02:00
|
|
|
|
2009-08-04 18:02:27 +02:00
|
|
|
postInstall =
|
|
|
|
''
|
|
|
|
# extboot.bin isn't installed due to a bug in the Makefile.
|
|
|
|
cp pc-bios/optionrom/extboot.bin $out/share/qemu/
|
2011-03-31 13:57:02 +02:00
|
|
|
|
|
|
|
# Libvirt expects us to be called `qemu-kvm'. Otherwise it will
|
|
|
|
# set the domain type to "qemu" rather than "kvm", which can
|
|
|
|
# cause architecture selection to misbehave.
|
|
|
|
ln -s $(cd $out/bin && echo qemu-system-*) $out/bin/qemu-kvm
|
2009-08-04 18:02:27 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://www.linux-kvm.org/;
|
|
|
|
description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions";
|
2011-06-17 23:23:12 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2009-08-04 18:02:27 +02:00
|
|
|
};
|
|
|
|
}
|