Skip to content

Commit 063fe1e

Browse files
johnalotoskiJimbo4350
authored andcommitted
releaseBins: switch to an allowList rather than denyList approach
1 parent 3238dd0 commit 063fe1e

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

flake.nix

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,27 @@
292292
exes;
293293

294294
ciJobs = let
295+
releaseBins = [
296+
"bech32"
297+
"cardano-cli"
298+
"cardano-node"
299+
"cardano-submit-api"
300+
"cardano-testnet"
301+
"cardano-tracer"
302+
"db-analyser"
303+
"db-synthesizer"
304+
"db-truncater"
305+
"snapshot-converter"
306+
"tx-generator"
307+
];
308+
295309
ciJobsVariants =
296310
mapAttrs (
297311
_: p:
298312
(mkFlakeAttrs (pkgs.extend (prev: final: {cardanoNodeProject = p;}))).ciJobs
299313
)
300314
project.projectVariants;
315+
301316
ciJobs =
302317
{
303318
cardano-deployment = pkgs.cardanoLib.mkConfigHtml {inherit (pkgs.cardanoLib.environments) mainnet preview preprod;};
@@ -331,7 +346,9 @@
331346
inherit pkgs;
332347
inherit (exes.cardano-node.identifier) version;
333348
platform = "linux";
334-
exes = lib.collect lib.isDerivation projectExes;
349+
exes = lib.collect lib.isDerivation (
350+
lib.filterAttrs (n: _: builtins.elem n releaseBins) projectExes
351+
);
335352
};
336353
internal.roots.project = muslProject.roots;
337354
variants = mapAttrs (_: v: removeAttrs v.musl ["variants"]) ciJobsVariants;
@@ -347,7 +364,9 @@
347364
inherit pkgs;
348365
inherit (exes.cardano-node.identifier) version;
349366
platform = "win64";
350-
exes = lib.collect lib.isDerivation projectExes;
367+
exes = lib.collect lib.isDerivation (
368+
lib.filterAttrs (n: _: builtins.elem n releaseBins) projectExes
369+
);
351370
};
352371
internal.roots.project = windowsProject.roots;
353372
variants = mapAttrs (_: v: removeAttrs v.windows ["variants"]) ciJobsVariants;
@@ -365,7 +384,9 @@
365384
inherit pkgs;
366385
inherit (exes.cardano-node.identifier) version;
367386
platform = "macos";
368-
exes = lib.collect lib.isDerivation (collectExes project);
387+
exes = lib.collect lib.isDerivation (
388+
lib.filterAttrs (n: _: builtins.elem n releaseBins) (collectExes project)
389+
);
369390
};
370391
shells = removeAttrs devShells ["profiled"];
371392
internal = {
@@ -375,6 +396,7 @@
375396
variants = mapAttrs (_: v: removeAttrs v.native ["variants"]) ciJobsVariants;
376397
};
377398
};
399+
378400
nonRequiredPaths =
379401
[
380402
# FIXME: cardano-tracer-test for windows should probably be disabled in haskell.nix config:

0 commit comments

Comments
 (0)