nixpkgs/pkgs/os-specific/linux/qemu-kvm/default.nix
Eelco Dolstra 5b1ee7a0da * qemu-kvm: install a symlink "qemu-kvm" to "qemu-system-x86_64".
Libvirt (and Nova) expects this.

svn path=/nixpkgs/branches/modular-python/; revision=26625
2011-03-31 11:57:02 +00:00

39 lines
1.1 KiB
Nix

{ stdenv, fetchurl, zlib, SDL, alsaLib, pkgconfig, pciutils, libuuid, vde2 }:
assert stdenv.isLinux;
stdenv.mkDerivation rec {
name = "qemu-kvm-0.14.0";
src = fetchurl {
url = "mirror://sourceforge/kvm/${name}.tar.gz";
sha256 = "0d86bj1sipg9br8xks9527cjc482gf9813h8rm690yswcprsyqig";
};
patches = [ ./smb-tmpdir.patch ];
buildInputs = [ zlib SDL alsaLib pkgconfig pciutils libuuid vde2 ];
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";
};
}