anchor.diff:        }];
       };
   
  -    libvirt.test.out.result = pkgs.stdenv.mkDerivation {
  -      name = "test-result";
  -
  -      phases = [ "buildPhase" ];
  -
  -      buildPhase = ''
  -        export output="${cfg.out.output}"
  -        echo "Verifying test output $output"
  -        ${cfg.verification-script}
  -        test -a "$out" || mkdir "$out"
  -      '';
  -    };
  -
  -    libvirt.test.out.output = pkgs.stdenv.mkDerivation {
  -      name = "test-output";
  +    libvirt.test.out = pkgs.stdenv.mkDerivation {
  +      name = "libvirt-test";
   
         src = runCommand "test-src" {} ''
           mkdir $out
  
positive.code:         default = 600;
        };
  
        out = {
          result = mkOption {
            type = types.path;
            description = ''
              The result of the test, as a nix derivation. This build
              fails if the verification script fails.
            '';
          };
          output = mkOption {
            type = types.path;
            description = ''
              The output produced by the test, as a nix derivation.
              This build always succeed.
            '';
          };
        };
  
        backend = mkOption {
  
negative.code:         gid="$(id -g)"
  
          # Setup directories and libvirt XML files
          mkdir -p build/libvirt build/hosts/{${instList}}
          touch build/std{out,err} build/hosts/{${instList}}/{console,journal}.log
          cp -t build/libvirt "$src"/*
          for f in build/libvirt/{dom,net}-*.xml; do substituteAllInPlace "$f"; done
          ${optionalString (cfg.backend == "lxc") "mkdir root-{${instList}}"}
  
          # Let libvirt access paths inside the build directory and write to out dirs
          chmod a+x .
          chmod a+w build build/std{out,err} build/hosts/*
  
          # Start the libvirt machines
          ${pkgs.libvirt}/bin/virsh -c "${cfg.connectionURI}" \
            "${virshCmds}" >/dev/null &
          virshpid=$!
  