|
63 | 63 | inherit (project.hsPkgs.cardano-cli.components.exes) cardano-cli; |
64 | 64 | }) |
65 | 65 |
|
66 | | - (final: prev: |
67 | | - let |
68 | | - profiled = project.profiled.exes; |
69 | | - in { |
70 | | - # The cardano-db-sync NixOS module (nix/nixos/cardano-db-sync-service.nix) |
71 | | - # expects these to be here |
72 | | - inherit (project.exes) |
73 | | - cardano-db-sync |
74 | | - cardano-db-tool |
75 | | - cardano-smash-server; |
| 66 | + (final: prev: { |
| 67 | + # The cardano-db-sync NixOS module (nix/nixos/cardano-db-sync-service.nix) |
| 68 | + # expects these to be here |
| 69 | + inherit (exes) |
| 70 | + cardano-db-sync |
| 71 | + cardano-db-tool |
| 72 | + cardano-smash-server; |
76 | 73 |
|
77 | | - cardano-db-sync-profiled = profiled.cardano-db-sync; |
78 | | - cardano-smash-server-profiled = profiled.cardano-smash-server; |
| 74 | + cardano-db-sync-profiled = profiledExes.cardano-db-sync; |
| 75 | + cardano-smash-server-profiled = profiledExes.cardano-smash-server; |
79 | 76 |
|
80 | | - schema = ./schema; |
| 77 | + schema = ./schema; |
81 | 78 | }) |
82 | 79 |
|
83 | 80 | (final: prev: { |
|
112 | 109 | ]; |
113 | 110 | }; |
114 | 111 |
|
| 112 | + |
115 | 113 | # Set up and start Postgres before running database tests |
116 | 114 | preCheck = '' |
117 | 115 | echo pre-check |
|
380 | 378 | }) |
381 | 379 | ]; |
382 | 380 |
|
| 381 | + setGitRev = nixpkgs.setGitRev (self.rev or "dirty"); |
| 382 | + |
| 383 | + setGitRevs = exes: |
| 384 | + with nixpkgs.lib; pipe exes [ |
| 385 | + (filterAttrs (_: isDerivation)) |
| 386 | + (mapAttrs (_: setGitRev)) |
| 387 | + ]; |
| 388 | + |
| 389 | + exes = setGitRevs project.exes; |
| 390 | + profiledExes = setGitRevs project.profiled.exes; |
| 391 | + |
383 | 392 | staticChecks = |
384 | 393 | let |
385 | 394 | inherit (project.args) src compiler-nix-name; |
|
395 | 404 | let |
396 | 405 | mkDist = platform: project: |
397 | 406 | let |
398 | | - exes = with lib; pipe project.exes [ |
399 | | - (collect isDerivation) |
400 | | - (map setGitRev) |
401 | | - ]; |
| 407 | + exeVals = builtins.attrValues exes; |
402 | 408 | name = "cardano-db-sync-${version}-${platform}"; |
403 | 409 | version = project.exes.cardano-db-sync.identifier.version; |
404 | 410 | env = { |
|
415 | 421 | --no-clobber \ |
416 | 422 | --remove-destination \ |
417 | 423 | --verbose \ |
418 | | - ${lib.concatMapStringsSep " " (exe: "${exe}/bin/*") exes} \ |
| 424 | + ${lib.concatMapStringsSep " " (exe: "${exe}/bin/*") exeVals} \ |
419 | 425 | ./bin |
420 | 426 |
|
421 | 427 | # Copy magrations to intermediate dir |
|
433 | 439 | (platform == "macos") |
434 | 440 | (lib.concatMapStrings |
435 | 441 | (exe: "rewrite-libs . ${exe}/bin/*") |
436 | | - exes)} |
| 442 | + exeVals)} |
437 | 443 |
|
438 | 444 | # Package distribution |
439 | 445 | dist_file=${name}.tar.gz |
|
481 | 487 | else |
482 | 488 | drv; |
483 | 489 |
|
484 | | - setGitRev = nixpkgs.setGitRev (self.rev or "dirty"); |
485 | | - |
486 | 490 | in rec { |
487 | 491 | checks = staticChecks; |
488 | 492 |
|
|
523 | 527 | cardano-smash-server-docker |
524 | 528 | project; |
525 | 529 |
|
526 | | - default = flake.packages."cardano-db-sync:exe:cardano-db-sync"; |
| 530 | + default = exes.cardano-db-sync; |
527 | 531 | } // lib.optionalAttrs (system == "x86_64-darwin") { |
528 | 532 | inherit cardano-db-sync-macos; |
529 | 533 | } // { |
|
0 commit comments