Skip to content

Commit 9b4768e

Browse files
committed
prepare for garnix
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.
1 parent a5cd0b8 commit 9b4768e

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

flake.nix

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22
description = "Cardano Node";
33

44
nixConfig = {
5-
extra-substituters = [ "https://cache.iog.io" ];
6-
extra-trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
5+
extra-substituters = [
6+
"https://cache.iog.io"
7+
"https://cache.garnix.io"
8+
];
9+
extra-trusted-public-keys = [
10+
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
11+
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
12+
];
713
};
814

915
inputs = {
@@ -393,6 +399,26 @@
393399
}) required;
394400
});
395401

402+
checks = let
403+
# https://github.com/numtide/flake-utils/issues/121#issuecomment-2589899217
404+
recurseIntoDeepAttrs = attrs:
405+
lib.recurseIntoAttrs (lib.mapAttrs (_: v:
406+
if builtins.typeOf v == "set" && !lib.isDerivation v
407+
then recurseIntoDeepAttrs v
408+
else v
409+
) attrs);
410+
in lib.genAttrs supportedSystems (system:
411+
utils.lib.flattenTree (recurseIntoDeepAttrs flake.ciJobs.${system})
412+
// {
413+
inherit (
414+
let pkgs = self.legacyPackages.${system}; in
415+
pkgs.callPackages iohkNix.utils.ciJobsAggregates {
416+
ciJobs = lib.mapAttrs (_: lib.getAttr "required") flake.ciJobs.${system};
417+
}
418+
) required;
419+
}
420+
);
421+
396422
# allows precise paths (avoid fallbacks) with nix build/eval:
397423
outputs = self;
398424

garnix.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
builds:
2+
include:
3+
- 'checks.*.*'

0 commit comments

Comments
 (0)