diff options
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 55 |
1 files changed, 36 insertions, 19 deletions
diff --git a/default.nix b/default.nix index f43e11bea3..015fdd1ead 100644 --- a/default.nix +++ b/default.nix @@ -6,6 +6,7 @@ , parentTargetMap ? null , nixpkgsConfig ? { } , localSystem ? builtins.currentSystem +, crossSystem ? null , ... }@args: @@ -62,20 +63,23 @@ let filter = parts: args: corpFilter parts (usersFilter parts args); scopedArgs = { __findFile = _: _: throw "Do not import from NIX_PATH in the depot!"; + builtins = builtins // { + currentSystem = throw "Use localSystem from the readTree args instead of builtins.currentSystem!"; + }; }; }; # To determine build targets, we walk through the depot tree and # fetch attributes that were imported by readTree and are buildable. # - # Any build target that contains `meta.ci.skip = true` will be skipped. - + # Any build target that contains `meta.ci.skip = true` or is marked + # broken will be skipped. # Is this tree node eligible for build inclusion? - eligible = node: (node ? outPath) && !(node.meta.ci.skip or false); + eligible = node: (node ? outPath) && !(node.meta.ci.skip or (node.meta.broken or false)); in readTree.fix (self: (readDepot { - inherit localSystem; + inherit localSystem crossSystem; depot = self; # Pass third_party as 'pkgs' (for compatibility with external @@ -100,25 +104,38 @@ readTree.fix (self: (readDepot { filter = self.third_party.nixpkgs.lib.cleanSourceFilter; }; + # Additionally targets can be excluded from CI by adding them to the + # list below. + ci.excluded = [ + # xanthous and related targets are disabled until cl/9186 is submitted + self.users.aspen.xanthous + self.users.aspen.system.system.mugwumpSystem + + # Temporarily disabled after cl/11289. Hopefully these failures are transient + # and will disappear with the next channel bump. + self.users.wpcarro.nixos.avaSystem + self.users.wpcarro.nixos.kyokoSystem + self.users.wpcarro.nixos.marcusSystem + self.users.wpcarro.nixos.tarascoSystem + ]; + # List of all buildable targets, for CI purposes. # # Note: To prevent infinite recursion, this *must* be a nested # attribute set (which does not have a __readTree attribute). - ci.targets = readTree.gather eligible (self // { - # remove the pipelines themselves from the set over which to - # generate pipelines because that also leads to infinite - # recursion. - ops = self.ops // { pipelines = null; }; - - # remove nixpkgs from the set, for obvious reasons. - third_party = self.third_party // { nixpkgs = null; }; - }); + ci.targets = readTree.gather + (t: (eligible t) && (!builtins.elem t self.ci.excluded)) + (self // { + # remove the pipelines themselves from the set over which to + # generate pipelines because that also leads to infinite + # recursion. + ops = self.ops // { pipelines = null; }; + }); # Derivation that gcroots all depot targets. - ci.gcroot = with self.third_party.nixpkgs; makeSetupHook - { - name = "depot-gcroot"; - deps = self.ci.targets; - } - emptyFile; + ci.gcroot = with self.third_party.nixpkgs; writeText "depot-gcroot" + (builtins.concatStringsSep "\n" + (lib.flatten + (map (p: map (o: p.${o}) p.outputs or [ ]) # list all outputs of each drv + self.ci.targets))); }) |