From 17f519e590253bda3fc5a820fd3d6aa8ca5587e7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 2 Oct 2013 14:11:46 +0200 Subject: Use "cp" instead of "rsync" for VirtualBox image generation Rsync appears to use a lot of memory. Fixes #266. --- modules/virtualisation/virtualbox-image.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/virtualisation/virtualbox-image.nix b/modules/virtualisation/virtualbox-image.nix index 21b2e114340b..073db7b255ed 100644 --- a/modules/virtualisation/virtualbox-image.nix +++ b/modules/virtualisation/virtualbox-image.nix @@ -6,7 +6,7 @@ with pkgs.lib; system.build.virtualBoxImage = pkgs.vmTools.runInLinuxVM ( pkgs.runCommand "virtualbox-image" - { memSize = 2047; + { memSize = 512; preVM = '' mkdir $out @@ -45,8 +45,9 @@ with pkgs.lib; # Copy all paths in the closure to the filesystem. storePaths=$(perl ${pkgs.pathsFromGraph} /tmp/xchg/closure) + echo "filling Nix store..." mkdir -p /mnt/nix/store - ${pkgs.rsync}/bin/rsync -av $storePaths /mnt/nix/store/ + cp -prd $storePaths /mnt/nix/store/ # Register the paths in the Nix database. printRegistration=1 perl ${pkgs.pathsFromGraph} /tmp/xchg/closure | \ -- cgit 1.4.1