|
76 | 76 | utils, |
77 | 77 | ... |
78 | 78 | } @ input: let |
| 79 | + inherit (builtins) elem match; |
79 | 80 | inherit (nixpkgs) lib; |
80 | | - inherit (lib) head mapAttrs recursiveUpdate optionalAttrs; |
| 81 | + inherit (lib) collect getAttr genAttrs filterAttrs hasPrefix head isDerivation mapAttrs optionalAttrs optionals recursiveUpdate ; |
81 | 82 | inherit (utils.lib) eachSystem flattenTree; |
82 | 83 | inherit (iohkNix.lib) prefixNamesWith; |
83 | 84 | removeRecurse = lib.filterAttrsRecursive (n: _: n != "recurseForDerivations"); |
|
137 | 138 | # have no git revision but for the same compilation alternative. |
138 | 139 | cardano-node = |
139 | 140 | let node = project.exes.cardano-node; |
140 | | - in lib.recursiveUpdate |
| 141 | + in recursiveUpdate |
141 | 142 | (set-git-rev node) |
142 | 143 | {passthru = {noGitRev = node;};} |
143 | 144 | ; |
144 | 145 | cardano-cli = |
145 | 146 | let cli = cardano-cli.components.exes.cardano-cli; |
146 | | - in lib.recursiveUpdate |
| 147 | + in recursiveUpdate |
147 | 148 | (set-git-rev cli) |
148 | 149 | {passthru = {noGitRev = cli;};} |
149 | 150 | ; |
150 | 151 | } // optionalAttrs (project.exes ? tx-generator) { |
151 | 152 | tx-generator = |
152 | 153 | let tx-gen = project.exes.tx-generator; |
153 | | - in lib.recursiveUpdate |
| 154 | + in recursiveUpdate |
154 | 155 | (set-git-rev tx-gen) |
155 | 156 | {passthru = {noGitRev = tx-gen;};} |
156 | 157 | ; |
|
279 | 280 | // (prefixNamesWith "checks/" checks); |
280 | 281 |
|
281 | 282 | apps = |
282 | | - lib.mapAttrs (n: p: { |
| 283 | + mapAttrs (n: p: { |
283 | 284 | type = "app"; |
284 | 285 | program = |
285 | 286 | p.exePath |
|
326 | 327 | roots.project = project.roots; |
327 | 328 | plan-nix.project = project.plan-nix; |
328 | 329 | }; |
329 | | - profiled = lib.genAttrs ["cardano-node" "tx-generator" "locli"] ( |
| 330 | + profiled = genAttrs ["cardano-node" "tx-generator" "locli"] ( |
330 | 331 | n: |
331 | 332 | packages.${n}.passthru.profiled |
332 | 333 | ); |
333 | | - asserted = lib.genAttrs ["cardano-node"] ( |
| 334 | + asserted = genAttrs ["cardano-node"] ( |
334 | 335 | n: |
335 | 336 | packages.${n}.passthru.asserted |
336 | 337 | ); |
|
346 | 347 | inherit pkgs; |
347 | 348 | inherit (exes.cardano-node.identifier) version; |
348 | 349 | platform = "linux"; |
349 | | - exes = lib.collect lib.isDerivation ( |
350 | | - lib.filterAttrs (n: _: builtins.elem n releaseBins) projectExes |
| 350 | + exes = collect isDerivation ( |
| 351 | + filterAttrs (n: _: elem n releaseBins) projectExes |
351 | 352 | ); |
352 | 353 | }; |
353 | 354 | internal.roots.project = muslProject.roots; |
|
364 | 365 | inherit pkgs; |
365 | 366 | inherit (exes.cardano-node.identifier) version; |
366 | 367 | platform = "win64"; |
367 | | - exes = lib.collect lib.isDerivation ( |
368 | | - lib.filterAttrs (n: _: builtins.elem n releaseBins) projectExes |
| 368 | + exes = collect isDerivation ( |
| 369 | + filterAttrs (n: _: elem n releaseBins) projectExes |
369 | 370 | ); |
370 | 371 | }; |
371 | 372 | internal.roots.project = windowsProject.roots; |
|
374 | 375 | } |
375 | 376 | // optionalAttrs (system == "x86_64-darwin") { |
376 | 377 | native = |
377 | | - lib.filterAttrs |
| 378 | + filterAttrs |
378 | 379 | (n: _: |
379 | 380 | # Only build docker images once on linux: |
380 | | - !(lib.hasPrefix "dockerImage" n)) |
| 381 | + !(hasPrefix "dockerImage" n)) |
381 | 382 | packages |
382 | 383 | // { |
383 | 384 | cardano-node-macos = import ./nix/binary-release.nix { |
384 | 385 | inherit pkgs; |
385 | 386 | inherit (exes.cardano-node.identifier) version; |
386 | 387 | platform = "macos"; |
387 | | - exes = lib.collect lib.isDerivation ( |
388 | | - lib.filterAttrs (n: _: builtins.elem n releaseBins) (collectExes project) |
| 388 | + exes = collect isDerivation ( |
| 389 | + filterAttrs (n: _: elem n releaseBins) (collectExes project) |
389 | 390 | ); |
390 | 391 | }; |
391 | 392 | shells = removeAttrs devShells ["profiled"]; |
|
406 | 407 | # system-tests are build and run separately: |
407 | 408 | "native\\.(.*\\.)?system-tests" |
408 | 409 | ] |
409 | | - ++ lib.optionals (system == "x86_64-darwin") [ |
| 410 | + ++ optionals (system == "x86_64-darwin") [ |
410 | 411 | # FIXME: make variants nonrequired for macos until CI has more capacity for macos builds |
411 | 412 | "native\\.variants\\..*" |
412 | 413 | "native\\.checks/cardano-testnet/cardano-testnet-test" |
|
415 | 416 | pkgs.callPackages iohkNix.utils.ciJobsAggregates |
416 | 417 | { |
417 | 418 | inherit ciJobs; |
418 | | - nonRequiredPaths = map (r: p: builtins.match r p != null) nonRequiredPaths; |
| 419 | + nonRequiredPaths = map (r: p: match r p != null) nonRequiredPaths; |
419 | 420 | } |
420 | 421 | // ciJobs; |
421 | 422 | }; |
|
463 | 464 | inherit |
464 | 465 | (pkgs.callPackages iohkNix.utils.ciJobsAggregates { |
465 | 466 | ciJobs = |
466 | | - lib.mapAttrs (_: lib.getAttr "required") flake.ciJobs |
| 467 | + mapAttrs (_: getAttr "required") flake.ciJobs |
467 | 468 | // { |
468 | 469 | # Ensure hydra notify: |
469 | 470 | gitrev = pkgs.writeText "gitrev" pkgs.gitrev; |
|
0 commit comments