File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change 355
355
# Collect local package `exe`s
356
356
nixpkgs . haskell-nix . haskellLib . projectOverlays . projectComponents
357
357
358
- # Add git revision to `exe`s
359
- ( final : prev : {
360
- hsPkgs = final . pkgs . setGitRevForPaths ( self . rev or "dirty" ) [
361
- "cardano-db-sync.components.exes.cardano-db-sync"
362
- "cardano-smash-server.components.exes.cardano-smash-server"
363
- "cardano-db-tool.components.exes.cardano-db-tool"
364
- ] prev . hsPkgs ;
365
- } )
366
-
367
358
( final : prev : {
368
359
profiled = final . appendModule {
369
360
modules = [ {
393
384
let
394
385
mkDist = platform : project :
395
386
let
396
- exes = lib . collect lib . isDerivation project . exes ;
387
+ exes = with lib ; pipe project . exes [
388
+ ( collect isDerivation )
389
+ ( map setGitRev )
390
+ ] ;
397
391
name = "cardano-db-sync-${ version } -${ platform } " ;
398
392
version = project . exes . cardano-db-sync . identifier . version ;
399
393
env = {
460
454
nonRequiredMacOSPaths
461
455
else [ ] ;
462
456
457
+ exeSetGitRev = drvKey : drv :
458
+ if nixpkgs . lib . hasInfix ":exe:" drvKey then
459
+ setGitRev drv
460
+ else
461
+ drv ;
462
+
463
+ setGitRev = nixpkgs . setGitRev ( self . rev or "dirty" ) ;
464
+
463
465
in rec {
464
466
checks = staticChecks ;
465
467
494
496
inherit cardano-db-sync-macos ;
495
497
} // {
496
498
inherit cardano-smash-server-no-basic-auth profiled ;
497
- } ;
499
+ # Run setGitRev on all packages that have ":exe:" in their key
500
+ } // builtins . mapAttrs exeSetGitRev flake . packages ;
498
501
} ) ) // {
499
502
nixosModules = {
500
503
cardano-db-sync = { pkgs , lib , ... } : {
You can’t perform that action at this time.
0 commit comments