Skip to content

Commit 9259b1c

Browse files
committed
Add ogmios 6.2.0
1 parent db723d3 commit 9259b1c

File tree

2 files changed

+87
-2
lines changed

2 files changed

+87
-2
lines changed

native-arm/flake.lock

Lines changed: 21 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native-arm/flake.nix

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
ogmios-5-6-0 = { url = "https://github.com/CardanoSolutions/ogmios.git"; ref = "refs/tags/v5.6.0"; type = "git"; submodules = true; flake = false; };
1717
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; };
1819
};
1920

2021
outputs = inputs: {
@@ -217,6 +218,70 @@
217218

218219
++
219220

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+
220285
(let
221286
input = "cardano-db-sync-13-1-0-0";
222287
version = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.${input}.original.ref;
@@ -415,7 +480,7 @@
415480
};
416481
}).defaultNix;
417482
in [
418-
# { name = "${input}--flake"; value = theFlake; }
483+
{ name = "${input}--flake"; value = theFlake; }
419484
# { name = "${input}--cardano-node"; value = theFlake.packages.${system}.cardano-node; }
420485
# { name = "${input}--cardano-submit-api"; value = theFlake.packages.${system}.cardano-submit-api; }
421486
{ name = "${input}--oci"; value = retagOCI "cardano-node" version theFlake.legacyPackages.${system}.dockerImage; }

0 commit comments

Comments
 (0)