anchor.diff:       'crossSystem' parameter for allPackages, defining the target
        platform for cross builds. */
     testOnCross = crossSystem: systems: f: {system ? builtins.currentSystem}:
  -    if pkgs.lib.elem system systems
  +    if elem system systems
       then f (allPackages { inherit system crossSystem; })
       else {};
   
   
     /* Map an attribute of the form `foo = [platforms...]'  to `testOn
        [platforms...] (pkgs: pkgs.foo)'. */
  -  mapTestOn = pkgs.lib.mapAttrsRecursiveCond
  +  mapTestOn = mapAttrsRecursiveCond
       (as: as.type or "" != "job")
       (path: value:
         let
           job = toJob value;
  -        getPkg = pkgs: pkgs.lib.getAttrFromPath path pkgs;
  +        getPkg = pkgs: getAttrFromPath path pkgs;
         in testOn job.systems getPkg);
   
   
     /* Similar to the testOn function, but with an additional 'crossSystem'
      * parameter for allPackages, defining the target platform for cross builds,
      * and triggering the build of the host derivation (cross built - crossDrv). */
  -  mapTestOnCross = crossSystem: pkgs.lib.mapAttrsRecursiveCond
  +  mapTestOnCross = crossSystem: mapAttrsRecursiveCond
       (as: as.type or "" != "job")
       (path: value:
         let
           job = toJob value;
  -        getPkg = pkgs: pkgs.lib.addMetaAttrs { maintainers = crossMaintainers; }
  -          (pkgs.lib.getAttrFromPath path pkgs);
  +        getPkg = pkgs: addMetaAttrs { maintainers = crossMaintainers; }
  +          (getAttrFromPath path pkgs);
         in testOnCross crossSystem job.systems getPkg);
   
   
     /* Find all packages that have a meta.platforms field listing the
        supported platforms. */
     packagesWithMetaPlatform = attrSet:
  -    let pairs = pkgs.lib.concatMap
  +    let pairs = concatMap
         (x:
           let pair = builtins.tryEval
                 (let
  -                 attrVal = (builtins.getAttr x attrSet);
  +                 attrVal = attrSet.${x};
                  in
                    { val = processPackage attrVal;
                      attrVal = attrVal;
  -                   attrValIsAttrs = builtins.isAttrs attrVal;
  +                   attrValIsAttrs = isAttrs attrVal;
                    });
               success = (builtins.tryEval pair.value.attrVal).success;
           in
  -        pkgs.lib.optional (success && pair.value.attrValIsAttrs && pair.value.val != [])
  +        optional (success && pair.value.attrValIsAttrs && pair.value.val != [])
             { name = x; value = pair.value.val; })
  -      (builtins.attrNames attrSet);
  +      (attrNames attrSet);
       in
  -      builtins.listToAttrs pairs;
  +      listToAttrs pairs;
   
   
     # May fail as much as it wishes, we will catch the error.
     processPackage = attrSet:
  -    if attrSet.recurseForDerivations or false then
  -      packagesWithMetaPlatform attrSet
  -    else if attrSet.recurseForRelease or false then
  +    if attrSet.recurseForDerivations or false || attrSet.recurseForRelease or false then
         packagesWithMetaPlatform attrSet
       else if attrSet.meta.broken or false then
         []
  
positive.code: { supportedSystems, packageSet ? (import ./all-packages.nix) }:
  
  rec {
  
  
negative.code:   /* The working or failing mails for cross builds will be sent only to
       the following maintainers, as most package maintainers will not be
       interested in the result of cross building a package. */
    crossMaintainers = [ maintainers.viric ];
  
  
    toJob = x: if isAttrs x then x else
      { type = "job"; systems = x; };
  
  
  