|
15 | 15 |
|
16 | 16 | ogmios-5-6-0 = { url = "https://github.com/CardanoSolutions/ogmios.git"; ref = "refs/tags/v5.6.0"; type = "git"; submodules = true; flake = false; }; |
17 | 17 | ogmios-6-1-0 = { url = "https://github.com/CardanoSolutions/ogmios.git"; ref = "refs/tags/v6.1.0"; type = "git"; submodules = true; flake = false; }; |
| 18 | + ogmios-6-2-0 = { url = "https://github.com/CardanoSolutions/ogmios.git"; ref = "refs/tags/v6.2.0"; type = "git"; submodules = true; flake = false; }; |
18 | 19 | }; |
19 | 20 |
|
20 | 21 | outputs = inputs: { |
|
217 | 218 |
|
218 | 219 | ++ |
219 | 220 |
|
| 221 | + (let |
| 222 | + input = "ogmios-6-2-0"; |
| 223 | + version = builtins.replaceStrings ["refs/tags/v"] [""] (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref; |
| 224 | + patched = pkgs.runCommandNoCC "ogmios-src" {} '' |
| 225 | + cp -r ${inputs.${input}} $out |
| 226 | + chmod -R +w $out |
| 227 | + find $out -name cabal.project.freeze -delete -o -name package.yaml -delete |
| 228 | + grep -RF -- -external-libsodium-vrf $out | cut -d: -f1 | sort --uniq | xargs -n1 -- sed -r s/-external-libsodium-vrf//g -i |
| 229 | + ( cd $out && patch -p1 -i ${./ogmios-6-1-0--missing-srp-hash.patch} ; ) |
| 230 | + ''; |
| 231 | + nodeFlake = inputs.self.outputs.packages.${system}."cardano-node-8-9-1--flake"; |
| 232 | + inherit (nodeFlake.legacyPackages.${system}) haskell-nix; |
| 233 | + project = haskell-nix.project { |
| 234 | + compiler-nix-name = "ghc963"; |
| 235 | + projectFileName = "cabal.project"; |
| 236 | + inputMap = { "https://input-output-hk.github.io/cardano-haskell-packages" = nodeFlake.inputs.CHaP; }; |
| 237 | + src = patched + "/server"; |
| 238 | + modules = [ ({ lib, pkgs, ... }: { |
| 239 | + packages.cardano-crypto-praos.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf ] ]; |
| 240 | + packages.cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ ([ pkgs.libsodium-vrf pkgs.secp256k1 ] |
| 241 | + ++ (if pkgs ? libblst then [pkgs.libblst] else [])) ]; |
| 242 | + packages.ogmios.components.library.preConfigure = "export GIT_SHA=${inputs.${input}.rev}"; |
| 243 | + }) ]; |
| 244 | + }; |
| 245 | + ogmios = project.hsPkgs.ogmios.components.exes.ogmios; |
| 246 | + in [ |
| 247 | + { name = "${input}"; value = ogmios; } |
| 248 | + { |
| 249 | + name = "${input}--oci"; |
| 250 | + value = let |
| 251 | + pkgs = nodeFlake.legacyPackages.${system}; |
| 252 | + in retagOCI "ogmios" "v${version}" (pkgs.dockerTools.buildImage { |
| 253 | + name = "ogmios"; |
| 254 | + tag = "v${version}"; |
| 255 | + config = { |
| 256 | + ExposedPorts = { |
| 257 | + "1337/tcp" = {}; |
| 258 | + }; |
| 259 | + Labels = { |
| 260 | + description = "A JSON WebSocket bridge for cardano-node."; |
| 261 | + name = "ogmios"; |
| 262 | + }; |
| 263 | + Entrypoint = [ "/bin/ogmios" ]; |
| 264 | + StopSignal = "SIGINT"; |
| 265 | + Healthcheck = { |
| 266 | + Test = [ "CMD-SHELL" "/bin/ogmios health-check" ]; |
| 267 | + Interval = 10000000000; |
| 268 | + Timeout = 5000000000; |
| 269 | + Retries = 1; |
| 270 | + }; |
| 271 | + }; |
| 272 | + copyToRoot = pkgs.buildEnv { |
| 273 | + name = "ogmios-env"; |
| 274 | + paths = [ ogmios ] ++ (with pkgs; [ busybox ]); |
| 275 | + postBuild = '' |
| 276 | + cp -r ${patched}/server/config/network $out/config |
| 277 | + ''; |
| 278 | + }; |
| 279 | + }); |
| 280 | + } |
| 281 | + ]) |
| 282 | + |
| 283 | + ++ |
| 284 | + |
220 | 285 | (let |
221 | 286 | input = "cardano-db-sync-13-1-0-0"; |
222 | 287 | version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref; |
|
415 | 480 | }; |
416 | 481 | }).defaultNix; |
417 | 482 | in [ |
418 | | - # { name = "${input}--flake"; value = theFlake; } |
| 483 | + { name = "${input}--flake"; value = theFlake; } |
419 | 484 | # { name = "${input}--cardano-node"; value = theFlake.packages.${system}.cardano-node; } |
420 | 485 | # { name = "${input}--cardano-submit-api"; value = theFlake.packages.${system}.cardano-submit-api; } |
421 | 486 | { name = "${input}--oci"; value = retagOCI "cardano-node" version theFlake.legacyPackages.${system}.dockerImage; } |
|
0 commit comments