nixpkgs/pkgs/os-specific/linux/qemu-kvm/default.nix
Eelco Dolstra f0197c653e * Backport a fix to qemu-kvm to prevent "qemu-img convert" from
creating corrupt VirtualBox images.
  (https://bugs.launchpad.net/qemu/+bug/919242)

svn path=/nixpkgs/trunk/; revision=32560
2012-02-25 17:34:21 +00:00

48 lines
1.4 KiB
Nix

{ stdenv, fetchurl, attr, zlib, SDL, alsaLib, pkgconfig, pciutils, libuuid, vde2
, libjpeg, libpng, ncurses, python, glib }:
assert stdenv.isLinux;
stdenv.mkDerivation rec {
name = "qemu-kvm-0.15.1";
src = fetchurl {
url = "mirror://sourceforge/kvm/${name}.tar.gz";
sha256 = "0gkk96yid3nq8i4z8xbiarj0r9v7b2zavf5mnh0rc7kclzxa7mmf";
};
patches = [ ./smb-tmpdir.patch ./qemu-img-fix-corrupt-vdi.patch ];
configureFlags = "--audio-drv-list=alsa";
enableParallelBuilding = true;
buildInputs =
[ attr zlib SDL alsaLib pkgconfig pciutils libuuid vde2 libjpeg libpng
ncurses python glib
];
preBuild =
''
# Don't use a hardcoded path to Samba.
substituteInPlace ./net.h --replace /usr/sbin/smbd smbd
'';
postInstall =
''
# extboot.bin isn't installed due to a bug in the Makefile.
cp pc-bios/optionrom/extboot.bin $out/share/qemu/
# 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
'';
meta = {
homepage = http://www.linux-kvm.org/;
description = "A full virtualization solution for Linux on x86 hardware containing virtualization extensions";
platforms = stdenv.lib.platforms.linux;
};
}