Skip to content

Commit a338dcf

Browse files
committed
also build iele
1 parent ccb2dd7 commit a338dcf

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

flake.nix

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838

3939
kevm = final.callPackage ./nix/pkgs/kevm.nix { };
4040

41+
iele = final.callPackage ./nix/pkgs/iele.nix { };
42+
4143
mantis-entrypoint = final.callPackage ./nix/entrypoint.nix { };
4244
};
4345

@@ -75,7 +77,6 @@
7577
defaultApp = apps.mantis;
7678
}) // (collectHydraSets [
7779
(mkHydraSet [ "mantis" ] [ "x86_64-linux" "x86_64-darwin" ])
78-
(mkHydraSet [ "kevm" ] [ "x86_64-linux" ])
79-
(mkHydraSet [ "mantis-entrypoint" ] [ "x86_64-linux" ])
80+
(mkHydraSet [ "kevm" "iele" "mantis-entrypoint" ] [ "x86_64-linux" ])
8081
]);
8182
}

nix/pkgs/iele.nix

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{ lib, stdenv, dockerTools, secp256k1, gmp5, mpfr, zlib }:
2+
let libPath = lib.makeLibraryPath [ secp256k1 gmp5 mpfr zlib ];
3+
in stdenv.mkDerivation {
4+
name = "iele";
5+
6+
src = dockerTools.pullImage {
7+
imageName = "inputoutput/mantis";
8+
imageDigest =
9+
"sha256:594ed009f1bc1f12b86e11136441602107c3d580476002d9bae58b258a74ac1b";
10+
sha256 = "sha256-JT+FarGQlgYoO392Ne1ofdqmishZLfH+OwV2CXTYwdA=";
11+
};
12+
13+
installPhase = ''
14+
mkdir -p tmp $out/bin
15+
tar --delay-directory-restore -C tmp -xf layer.tar || true
16+
17+
cp tmp/bin/iele-vm $out/bin
18+
chmod 0755 $out/bin/iele-vm
19+
20+
patchelf \
21+
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
22+
--set-rpath "${libPath}" \
23+
"$out/bin/iele-vm"
24+
'';
25+
}

nix/pkgs/mantis/wrapped.nix

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{ lib, stdenv, mantis, makeWrapper, jre, gawk, gnused, kevm, coreutils }:
1+
{ lib, stdenv, mantis, makeWrapper, jre, gawk, gnused, kevm, iele, coreutils }:
22
let
33
inherit (stdenv.lib) optionalString makeLibraryPath;
44
inherit (stdenv) cc isDarwin;
55
LD_LIBRARY_PATH = makeLibraryPath [ cc.cc.lib ];
6-
PATH = lib.makeBinPath [ jre gawk gnused kevm coreutils ];
6+
PATH = lib.makeBinPath [ jre gawk gnused kevm iele coreutils ];
77
in stdenv.mkDerivation {
88
pname = "mantis";
99
version = let
@@ -31,5 +31,6 @@ in stdenv.mkDerivation {
3131
done
3232
3333
ln -s ${kevm}/bin/kevm-vm $out/bin
34+
ln -s ${iele}/bin/iele-vm $out/bin
3435
'';
3536
}

0 commit comments

Comments
 (0)