|
85 | 85 | }@input: |
86 | 86 | let |
87 | 87 | inherit (nixpkgs) lib; |
88 | | - inherit (lib) head systems mapAttrs recursiveUpdate mkDefault |
89 | | - getAttrs optionalAttrs nameValuePair attrNames; |
90 | | - inherit (utils.lib) eachSystem mkApp flattenTree; |
| 88 | + inherit (lib) head mapAttrs recursiveUpdate optionalAttrs; |
| 89 | + inherit (utils.lib) eachSystem flattenTree; |
91 | 90 | inherit (iohkNix.lib) prefixNamesWith; |
92 | 91 | removeRecurse = lib.filterAttrsRecursive (n: _: n != "recurseForDerivations"); |
93 | 92 |
|
|
122 | 121 | ] ++ (import ops-lib.outPath {}).overlays; |
123 | 122 |
|
124 | 123 | collectExes = project: |
125 | | - let inherit (project.pkgs.stdenv) hostPlatform; |
126 | | - in project.exes // (with project.hsPkgs; { |
127 | | - inherit (ouroboros-consensus-cardano.components.exes) db-analyser db-synthesizer db-truncater; |
| 124 | + let set-git-rev = import ./nix/set-git-rev.nix { inherit (project) pkgs; }; |
| 125 | + in |
| 126 | + # take all executables from the project local packages |
| 127 | + project.exes // (with project.hsPkgs; { |
| 128 | + # add some executables from other relevant packages |
128 | 129 | inherit (bech32.components.exes) bech32; |
129 | | - inherit (cardano-cli.components.exes) cardano-cli; |
130 | | - } // lib.optionalAttrs hostPlatform.isUnix { |
| 130 | + inherit (ouroboros-consensus-cardano.components.exes) db-analyser db-synthesizer db-truncater; |
| 131 | + # add cardano-node and cardano-cli with their git revision stamp |
| 132 | + cardano-node = set-git-rev project.exes.cardano-node; |
| 133 | + cardano-cli = set-git-rev cardano-cli.components.exes.cardano-cli; |
131 | 134 | }); |
132 | 135 |
|
133 | 136 | mkCardanoNodePackages = project: (collectExes project) // { |
|
143 | 146 | project = pkgs.cardanoNodeProject; |
144 | 147 |
|
145 | 148 | # This is used by `nix develop .` to open a devShell |
146 | | - devShells = let shell = import ./shell.nix { inherit pkgs customConfig cardano-mainnet-mirror; }; in { |
| 149 | + devShells = |
| 150 | + let |
| 151 | + shell = import ./shell.nix { inherit pkgs customConfig cardano-mainnet-mirror; }; |
| 152 | + in { |
147 | 153 | inherit (shell) devops workbench-shell; |
148 | 154 | default = shell.dev; |
149 | 155 | cluster = shell; |
|
201 | 207 | backendName = "supervisor"; |
202 | 208 | useCabalRun = false; |
203 | 209 | cardano-node-rev = |
204 | | - if __hasAttr "rev" self |
| 210 | + if builtins.hasAttr "rev" self |
205 | 211 | then pkgs.gitrev |
206 | 212 | else throw "Cannot get git revision of 'cardano-node', unclean checkout?"; |
207 | 213 | }).workbench-profile-run; |
208 | 214 | in |
209 | | - rec { |
| 215 | + { |
210 | 216 | "dockerImage/node" = pkgs.dockerImage; |
211 | 217 | "dockerImage/submit-api" = pkgs.submitApiDockerImage; |
212 | 218 |
|
|
0 commit comments