anchor.diff:        '';
   
         phases = [ "buildPhase" ];
  +
  +      buildInputs = singleton (
  +        writeScriptBin "extra-build-steps" ''
  +          #!${bash}/bin/bash
  +          set -e
  +          ${cfg.extraBuildSteps}
  +        ''
  +      );
  +
  +      succeedOnFailure = true;
   
         buildPhase = ''
           function prettytail() {
  
positive.code:       }];
      };
  
      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";
  
        src = runCommand "test-src" {} ''
          mkdir $out
  
negative.code:           prettytail "${padName n}" "$build/${f}" &
          '') cfg.tailFiles)}
  
          # Wait for the test script to finish and then run any extra steps
          wait $virshpid && out=$out extra-build-steps || touch build/failed
  
          # Put build products in place
          cp -rnT build $out
          mkdir -p $out/nix-support
  
          (
            echo "file log $out/stdout"
            echo "file log $out/stderr"
            for i in ${toString instNames}; do for l in console journal; do
              echo "file log $out/hosts/$i/$l.log"
            done; done
          ) >> $out/nix-support/hydra-build-products
  
          if [ -a $out/failed ]; then
            rm $out/failed
            exit 1
          fi
        '';
      };
  
  