anchor.diff:    inherit pkgs;
   
   
  -  mkTestDriver = let
  -    testDriverScript = ./test-driver/test-driver.py;
  -  in qemu_pkg: stdenv.mkDerivation {
  -    name = "nixos-test-driver";
  -
  -    nativeBuildInputs = [ makeWrapper ];
  -    buildInputs = [ (python3.withPackages (p: [ p.ptpython ])) ];
  -    checkInputs = with python3Packages; [ pylint black mypy ];
  -
  -    dontUnpack = true;
  -
  -    preferLocalBuild = true;
  -
  -    doCheck = true;
  -    checkPhase = ''
  -      mypy --disallow-untyped-defs \
  -           --no-implicit-optional \
  -           --ignore-missing-imports ${testDriverScript}
  -      pylint --errors-only ${testDriverScript}
  -      black --check --diff ${testDriverScript}
  -    '';
  -
  -    installPhase =
  -      ''
  -        mkdir -p $out/bin
  -        cp ${testDriverScript} $out/bin/nixos-test-driver
  -        chmod u+x $out/bin/nixos-test-driver
  -        # TODO: copy user script part into this file (append)
  -
  -        wrapProgram $out/bin/nixos-test-driver \
  -          --prefix PATH : "${lib.makeBinPath [ qemu_pkg vde2 netpbm coreutils ]}" \
  +  mkTestDriver =
  +    let
  +      testDriverScript = ./test-driver/test-driver.py;
  +    in
  +    qemu_pkg: stdenv.mkDerivation {
  +      name = "nixos-test-driver";
  +
  +      nativeBuildInputs = [ makeWrapper ];
  +      buildInputs = [ (python3.withPackages (p: [ p.ptpython ])) ];
  +      checkInputs = with python3Packages; [ pylint black mypy ];
  +
  +      dontUnpack = true;
  +
  +      preferLocalBuild = true;
  +
  +      doCheck = true;
  +      checkPhase = ''
  +        mypy --disallow-untyped-defs \
  +             --no-implicit-optional \
  +             --ignore-missing-imports ${testDriverScript}
  +        pylint --errors-only ${testDriverScript}
  +        black --check --diff ${testDriverScript}
         '';
  -  };
  +
  +      installPhase =
  +        ''
  +          mkdir -p $out/bin
  +          cp ${testDriverScript} $out/bin/nixos-test-driver
  +          chmod u+x $out/bin/nixos-test-driver
  +          # TODO: copy user script part into this file (append)
  +
  +          wrapProgram $out/bin/nixos-test-driver \
  +            --prefix PATH : "${lib.makeBinPath [ qemu_pkg vde2 netpbm coreutils ]}" \
  +        '';
  +    };
   
     # Run an automated test suite in the given virtual network.
     # `driver' is the script that runs the network.
  
positive.code:           testDriver = mkTestDriver (if qemu_pkg == null then pkgs.qemu_test else qemu_pkg);
  
            nodes = build-vms.buildVirtualNetwork (
              t.nodes or (if t ? machine then { machine = t.machine; } else { }));
            vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes);
            vms = map (m: m.config.system.build.vm) (lib.attrValues nodes);
  
  
negative.code:           services.xserver.windowManager.icewm.enable = true;
          };
      in
      runInMachine ({
        machine = client;
        preBuild =
          ''
            client.wait_for_x()
          '';
      } // args);
  
  
    simpleTest = as: (makeTest as).test;
  