Skip to content

Commit

Permalink
put flattened .#hydraJobs in .#checks
Browse files Browse the repository at this point in the history
Garnix does not build the `hydraJobs` output
so move them all into the `checks` output,
adhering to the flake output schema
because garnix does not build nested attrsets.
  • Loading branch information
dermetfan committed Jan 14, 2025
1 parent a5cd0b8 commit 2bb3cf6
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,28 @@
}) required;
});

checks = let
# https://github.com/numtide/flake-utils/issues/121#issuecomment-2589899217
recurseIntoDeepAttrs = attrs:
lib.recurseIntoAttrs (lib.mapAttrs (_: v:
if builtins.typeOf v == "set" && !lib.isDerivation v
then recurseIntoDeepAttrs v
else v
) attrs);
in lib.genAttrs supportedSystems (system:
utils.lib.flattenTree (
recurseIntoDeepAttrs flake.ciJobs.${system}
// {
inherit (
let pkgs = self.legacyPackages.${system}; in
pkgs.callPackages iohkNix.utils.ciJobsAggregates {
ciJobs = lib.mapAttrs (_: lib.getAttr "required") flake.ciJobs.${system};
}
) required;
}
)
);

# allows precise paths (avoid fallbacks) with nix build/eval:
outputs = self;

Expand Down

0 comments on commit 2bb3cf6

Please sign in to comment.