From 106738b1962829cf5cdefc321cce00b028f1210d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 6 Oct 2015 15:03:26 +0200 Subject: [PATCH] Give more memory for the disk image builder http://hydra.nixos.org/build/26480662 --- nixos/lib/make-disk-image.nix | 1 + pkgs/build-support/vm/default.nix | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 79c5199cbec..01dd9c9ae7f 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -39,6 +39,7 @@ pkgs.vmTools.runInLinuxVM ( exportReferencesGraph = [ "closure" config.system.build.toplevel ]; inherit postVM; + memSize = 1024; } '' ${if partitioned then '' diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index c4fefe4d501..95b2c161b82 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -302,13 +302,13 @@ rec { `run-vm' will be left behind in the temporary build directory that allows you to boot into the VM and debug it interactively. */ - runInLinuxVM = drv: lib.overrideDerivation drv (attrs: { + runInLinuxVM = drv: lib.overrideDerivation drv ({ memSize ? 512, QEMU_OPTS ? "", args, builder, ... }: { requiredSystemFeatures = [ "kvm" ]; builder = "${bash}/bin/sh"; args = ["-e" (vmRunCommand qemuCommandLinux)]; - origArgs = attrs.args; - origBuilder = attrs.builder; - QEMU_OPTS = "${attrs.QEMU_OPTS or ""} -m ${toString (attrs.memSize or 512)}"; + origArgs = args; + origBuilder = builder; + QEMU_OPTS = "${QEMU_OPTS} -m ${toString memSize}"; });