Allow QEMU to fallback to full simulation if /dev/kvm is not available.

This commit is contained in:
Russell O'Connor 2014-08-12 20:30:46 +02:00 committed by Eelco Dolstra
parent 6c2763c3bf
commit a431a96df9
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
# Add a qemu-kvm wrapper for compatibility/convenience.
p="$out/bin/qemu-system-${if stdenv.system == "x86_64-linux" then "x86_64" else "i386"}"
if [ -e "$p" ]; then
makeWrapper "$p" $out/bin/qemu-kvm --add-flags "-enable-kvm"
makeWrapper "$p" $out/bin/qemu-kvm --add-flags "\$([ -e /dev/kvm ] && echo -enable-kvm)"
fi
'';