Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 44 additions & 37 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
} @ input: let
inherit (builtins) elem match;
inherit (nixpkgs) lib;
inherit (lib) collect getAttr genAttrs filterAttrs hasPrefix head isDerivation mapAttrs optionalAttrs optionals recursiveUpdate ;
inherit (lib) collect getAttr genAttrs filterAttrs hasPrefix head isDerivation mapAttrs optionalAttrs optionals recursiveUpdate;
inherit (utils.lib) eachSystem flattenTree;
inherit (iohkNix.lib) prefixNamesWith;
removeRecurse = lib.filterAttrsRecursive (n: _: n != "recurseForDerivations");
Expand Down Expand Up @@ -126,40 +126,43 @@
in
# Take all executables from the project local packages
project.exes
// (with project.hsPkgs; {
# Add some executables from other relevant packages
inherit (bech32.components.exes) bech32;
inherit (ouroboros-consensus-cardano.components.exes) db-analyser db-synthesizer db-truncater snapshot-converter;
# Add cardano-node, cardano-cli and tx-generator with their git revision stamp.
# Keep available an alternative without the git revision, like the other
# passthru (profiled and asserted in nix/haskell.nix) that
# have no git revision but for the same compilation alternative.
cardano-node =
let node = project.exes.cardano-node;
in recursiveUpdate
(set-git-rev node)
{passthru = {noGitRev = node;};}
;
cardano-cli =
let cli = cardano-cli.components.exes.cardano-cli;
in recursiveUpdate
(set-git-rev cli)
{passthru = {noGitRev = cli;};}
;
cardano-submit-api =
let submit-api = project.exes.cardano-submit-api;
in recursiveUpdate
(set-git-rev submit-api)
{passthru = {noGitRev = submit-api;};}
;
} // optionalAttrs (project.exes ? tx-generator) {
tx-generator =
let tx-gen = project.exes.tx-generator;
in recursiveUpdate
(set-git-rev tx-gen)
{passthru = {noGitRev = tx-gen;};}
;
});
// (with project.hsPkgs;
{
# Add some executables from other relevant packages
inherit (bech32.components.exes) bech32;
inherit (dmq-node.components.exes) dmq-node;
inherit (ouroboros-consensus-cardano.components.exes) db-analyser db-synthesizer db-truncater snapshot-converter;
# Add cardano-node, cardano-cli and tx-generator with their git revision stamp.
# Keep available an alternative without the git revision, like the other
# passthru (profiled and asserted in nix/haskell.nix) that
# have no git revision but for the same compilation alternative.
cardano-node = let
node = project.exes.cardano-node;
in
recursiveUpdate
(set-git-rev node)
{passthru = {noGitRev = node;};};
cardano-cli = let
cli = cardano-cli.components.exes.cardano-cli;
in
recursiveUpdate
(set-git-rev cli)
{passthru = {noGitRev = cli;};};
cardano-submit-api = let
submit-api = project.exes.cardano-submit-api;
in
recursiveUpdate
(set-git-rev submit-api)
{passthru = {noGitRev = submit-api;};};
}
// optionalAttrs (project.exes ? tx-generator) {
tx-generator = let
tx-gen = project.exes.tx-generator;
in
recursiveUpdate
(set-git-rev tx-gen)
{passthru = {noGitRev = tx-gen;};};
});

mkCardanoNodePackages = project:
(collectExes project)
Expand Down Expand Up @@ -308,6 +311,7 @@
"db-analyser"
"db-synthesizer"
"db-truncater"
"dmq-node"
"snapshot-converter"
"tx-generator"
];
Expand Down Expand Up @@ -501,7 +505,8 @@
customConfig.haskellNix
];
cardanoNodePackages = mkCardanoNodePackages final.cardanoNodeProject;
inherit (final.cardanoNodePackages)
inherit
(final.cardanoNodePackages)
bech32
cardano-cli
cardano-node
Expand All @@ -510,9 +515,11 @@
db-analyser
db-synthesizer
db-truncater
dmq-node
locli
snapshot-converter
tx-generator;
tx-generator
;
};
nixosModules = {
cardano-node = {
Expand Down
Loading