Use "cp" instead of "rsync" for VirtualBox image generation

Rsync appears to use a lot of memory.  Fixes #266.
This commit is contained in:
Eelco Dolstra 2013-10-02 14:11:46 +02:00
parent 472aff23b7
commit 17f519e590

View File

@ -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 | \