From 635c99ce878d5009eaf21da80319d5426a534cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Wed, 30 Mar 2016 09:47:09 +0200 Subject: [PATCH] vm: allow overriding QEMU_OPTS / memSize for images. It's nice to be able to create disk images with -smp 4 in qemu. --- pkgs/build-support/vm/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index c11c21170e0..56a13d6787a 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -414,12 +414,12 @@ rec { fillDiskWithRPMs = { size ? 4096, rpms, name, fullName, preInstall ? "", postInstall ? "" , runScripts ? true, createRootFS ? defaultCreateRootFS + , QEMU_OPTS ? "", memSize ? 512 , unifiedSystemDir ? false }: runInLinuxVM (stdenv.mkDerivation { - inherit name preInstall postInstall rpms; - memSize = 512; + inherit name preInstall postInstall rpms QEMU_OPTS memSize; preVM = createEmptyImage {inherit size fullName;}; buildCommand = '' @@ -685,10 +685,11 @@ rec { , packages, extraPackages ? [] , preInstall ? "", postInstall ? "", archs ? ["noarch" "i386"] , runScripts ? true, createRootFS ? defaultCreateRootFS + , QEMU_OPTS ? "", memSize ? 512 , unifiedSystemDir ? false }: fillDiskWithRPMs { - inherit name fullName size preInstall postInstall runScripts createRootFS unifiedSystemDir; + inherit name fullName size preInstall postInstall runScripts createRootFS unifiedSystemDir QEMU_OPTS memSize; rpms = import (rpmClosureGenerator { inherit name packagesLists urlPrefixes archs; packages = packages ++ extraPackages;