diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2016-03-30 09:47:09 +0200 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2016-04-01 10:32:59 +0200 |
commit | 635c99ce878d5009eaf21da80319d5426a534cee (patch) | |
tree | 3a9a56d1b0f2e4be4671dfbab7c04365dc544cc6 /pkgs/build-support/vm/default.nix | |
parent | 36aa19b105f607c1013bb49af2ad6e28c6aa2d5c (diff) | |
download | nixlib-635c99ce878d5009eaf21da80319d5426a534cee.tar nixlib-635c99ce878d5009eaf21da80319d5426a534cee.tar.gz nixlib-635c99ce878d5009eaf21da80319d5426a534cee.tar.bz2 nixlib-635c99ce878d5009eaf21da80319d5426a534cee.tar.lz nixlib-635c99ce878d5009eaf21da80319d5426a534cee.tar.xz nixlib-635c99ce878d5009eaf21da80319d5426a534cee.tar.zst nixlib-635c99ce878d5009eaf21da80319d5426a534cee.zip |
vm: allow overriding QEMU_OPTS / memSize for images.
It's nice to be able to create disk images with -smp 4 in qemu.
Diffstat (limited to 'pkgs/build-support/vm/default.nix')
-rw-r--r-- | pkgs/build-support/vm/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index c11c21170e01..56a13d6787a7 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; |