anchor.diff:      '';
     };
   
  -  vmBuild = { diskImage, name, builder, attrs ? {}, ncpu ? 6, memSize ? 4096 }:
  +  vmBuild = { diskImage, name, build, attrs ? {}, ncpu ? 6, memSize ? 4096 }:
       pkgs.vmTools.runInLinuxImage ((derivation (rec {
  -      inherit name;
  +      inherit name memSize;
         builder = "${pkgs.bash}/bin/bash";
         system = builtins.currentSystem;
  -      args = [ (toFile "builder.sh" ''
  +      args = [ (toFile "builder.sh" (''
           set -ex
           PATH=/usr/bin:/bin:/usr/sbin:/sbin
  -      '' + builder) ];
  +        '' + build)) ];
         QEMU_OPTS = "-smp ${toString ncpu}";
       } // attrs)) // {
         inherit diskImage;
  
positive.code:     name = "rethinkdb-${version}";
      version = unsafeDiscardStringContext (readFile versionFile);
      builder = mkBuilder ''
        # TODO: https://github.com/NixOS/nixpkgs/issues/13744
        export SSL_CERT_FILE=$cacert/etc/ssl/certs/ca-bundle.crt
        cp -r $src rethinkdb
        chmod -R u+w rethinkdb
        cd rethinkdb
        echo "${version}" > VERSION.OVERRIDE
        cp -r --no-preserve=all $fetchDependencies/* .
        ${patchScripts}
  
negative.code:       deb = arch: diskImage: vmBuild {
          name = replace "-src$" "-${arch}" dsc.name;
          attrs = { src = dsc; };
  	build = ''
            PATH=/usr/bin:/bin:/usr/sbin:/sbin
            mkdir /build
            dpkg-source -x $src/*.dsc /build/source
  