anchor.diff:       for the platform in question. */
     testOn = systems: f: {system ? builtins.currentSystem}:
       if pkgs.lib.elem system systems then f (allPackages {inherit system;}) else {};
  +
  +  /* Similar to the testOn function, but with an additional 'crossSystem'
  +   * parameter for allPackages, defining the target platform for cross builds */
  +  testOnCross = crossSystem: systems: f: {system ? builtins.currentSystem}:
  +    if pkgs.lib.elem system systems then f (allPackages {inherit system
  +                crossSystem;}) else {};
   
     /* Map an attribute of the form `foo = [platforms...]'  to `testOn
        [platforms...] (pkgs: pkgs.foo)'. */
  
positive.code:           pkgs.lib.addMetaAttrs { schedulingPriority = toString job.schedulingPriority; }
            (pkgs.lib.getAttrFromPath path pkgs);
        in testOn job.systems getPkg);
  
    /* Find all packages that have a meta.platforms field listing the
       supported platforms. */
  
negative.code:     xset = linux;
    };
  
  } )) // (
  /* Test some cross builds to the Sheevaplug */
  let
    crossSystem = {
        config = "armv5tel-unknown-linux-gnueabi";  
        bigEndian = false;
        arch = "arm";
        float = "soft";
    };
    nativePlatforms = linux;
  in {
    crossArmLinux = mapTestOnCross crossSystem (rec {
      bison = nativePlatforms;
      uboot = nativePlatforms;
      uclibc = nativePlatforms;
      xorg = {
        fontadobe100dpi = nativePlatforms;
        fontadobe75dpi = nativePlatforms;
        fontbh100dpi = nativePlatforms;
        fontbhlucidatypewriter100dpi = nativePlatforms;
        fontbhlucidatypewriter75dpi = nativePlatforms;
        fontbhttf = nativePlatforms;
        fontcursormisc = nativePlatforms;
        fontmiscmisc = nativePlatforms;
        iceauth = nativePlatforms;
        libX11 = nativePlatforms;
        lndir = all;
        setxkbmap = nativePlatforms;
        xauth = nativePlatforms;
        xev = nativePlatforms;
        xf86inputkeyboard = nativePlatforms;
        xf86inputmouse = nativePlatforms;
        xf86inputevdev = nativePlatforms;
        xf86inputsynaptics = nativePlatforms;
        xf86videoati = nativePlatforms;
        xf86videointel = nativePlatforms;
        xf86videonv = nativePlatforms;
        xf86videovesa = nativePlatforms;
        xfs = nativePlatforms;
        xkbcomp = nativePlatforms;
        xmessage = nativePlatforms;
        xorgserver = nativePlatforms;
        xrandr = nativePlatforms;
        xrdb = nativePlatforms;
        xset = nativePlatforms;
      };
    gtkLibs = {
      gtk = nativePlatforms;
    };
    });
  })
  