Skip to content

Commit 653da77

Browse files
committed
add flake outputs that cicero expects
This is a partial backport of 04c1e17
1 parent f75ed77 commit 653da77

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

flake.nix

+19-11
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,8 @@
397397
}
398398
);
399399

400-
makeRequired = isPr: extra:
400+
makeRequired = isPr: jobs: extra:
401401
let
402-
jobs = lib.foldl' lib.mergeAttrs { } (lib.attrValues flake.systemHydraJobs);
403402
nonRequiredPaths = map lib.hasPrefix ([ "macos." ] ++ lib.optional isPr "linux.native.membenches");
404403
in with self.legacyPackages.${defaultSystem};
405404
releaseTools.aggregate {
@@ -412,6 +411,14 @@
412411
jobs) ++ extra;
413412
};
414413

414+
makeOsRequired = isPr: jobs: {
415+
linux = jobs.linux // {
416+
required = makeRequired isPr jobs.linux [];
417+
};
418+
macos = jobs.macos // {
419+
required = makeRequired isPr jobs.macos [];
420+
};
421+
};
415422

416423
hydraJobs =
417424
let
@@ -422,8 +429,8 @@
422429
build-version = writeText "version.json" (builtins.toJSON {
423430
inherit (self) lastModified lastModifiedDate narHash outPath shortRev rev;
424431
});
425-
required = makeRequired false [ cardano-deployment build-version ];
426-
});
432+
required = makeRequired false jobs [ cardano-deployment build-version ];
433+
}) // makeOsRequired false jobs;
427434

428435
hydraJobsPr =
429436
let
@@ -432,14 +439,15 @@
432439
"linux.native.workbench-ci-analysis"
433440
"linux.native.workbench-ci-test"
434441
];
435-
in
436-
(lib.mapAttrsRecursiveCond (v: !(lib.isDerivation v))
437-
(path: value:
438-
let stringPath = lib.concatStringsSep "." path; in if lib.isAttrs value && (lib.any (p: p stringPath) nonPrJobs) then { } else value)
439-
hydraJobs) // {
440-
required = makeRequired true [ hydraJobs.cardano-deployment hydraJobs.build-version ];
441-
};
442442

443+
jobs = lib.mapAttrsRecursiveCond (v: !(lib.isDerivation v))
444+
(path: value:
445+
let stringPath = lib.concatStringsSep "." path; in if lib.isAttrs value && (lib.any (p: p stringPath) nonPrJobs) then { } else value)
446+
hydraJobs;
447+
in
448+
jobs // {
449+
required = makeRequired true jobs [ hydraJobs.cardano-deployment hydraJobs.build-version ];
450+
} // makeOsRequired true jobs;
443451
in
444452
builtins.removeAttrs flake [ "systemHydraJobs" ] // {
445453

0 commit comments

Comments
 (0)