Skip to content

Commit

Permalink
also build iele
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Mar 23, 2021
1 parent ccb2dd7 commit a338dcf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 4 deletions.
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

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

iele = final.callPackage ./nix/pkgs/iele.nix { };

mantis-entrypoint = final.callPackage ./nix/entrypoint.nix { };
};

Expand Down Expand Up @@ -75,7 +77,6 @@
defaultApp = apps.mantis;
}) // (collectHydraSets [
(mkHydraSet [ "mantis" ] [ "x86_64-linux" "x86_64-darwin" ])
(mkHydraSet [ "kevm" ] [ "x86_64-linux" ])
(mkHydraSet [ "mantis-entrypoint" ] [ "x86_64-linux" ])
(mkHydraSet [ "kevm" "iele" "mantis-entrypoint" ] [ "x86_64-linux" ])
]);
}
25 changes: 25 additions & 0 deletions nix/pkgs/iele.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ lib, stdenv, dockerTools, secp256k1, gmp5, mpfr, zlib }:
let libPath = lib.makeLibraryPath [ secp256k1 gmp5 mpfr zlib ];
in stdenv.mkDerivation {
name = "iele";

src = dockerTools.pullImage {
imageName = "inputoutput/mantis";
imageDigest =
"sha256:594ed009f1bc1f12b86e11136441602107c3d580476002d9bae58b258a74ac1b";
sha256 = "sha256-JT+FarGQlgYoO392Ne1ofdqmishZLfH+OwV2CXTYwdA=";
};

installPhase = ''
mkdir -p tmp $out/bin
tar --delay-directory-restore -C tmp -xf layer.tar || true
cp tmp/bin/iele-vm $out/bin
chmod 0755 $out/bin/iele-vm
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
"$out/bin/iele-vm"
'';
}
5 changes: 3 additions & 2 deletions nix/pkgs/mantis/wrapped.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ lib, stdenv, mantis, makeWrapper, jre, gawk, gnused, kevm, coreutils }:
{ lib, stdenv, mantis, makeWrapper, jre, gawk, gnused, kevm, iele, coreutils }:
let
inherit (stdenv.lib) optionalString makeLibraryPath;
inherit (stdenv) cc isDarwin;
LD_LIBRARY_PATH = makeLibraryPath [ cc.cc.lib ];
PATH = lib.makeBinPath [ jre gawk gnused kevm coreutils ];
PATH = lib.makeBinPath [ jre gawk gnused kevm iele coreutils ];
in stdenv.mkDerivation {
pname = "mantis";
version = let
Expand Down Expand Up @@ -31,5 +31,6 @@ in stdenv.mkDerivation {
done
ln -s ${kevm}/bin/kevm-vm $out/bin
ln -s ${iele}/bin/iele-vm $out/bin
'';
}

0 comments on commit a338dcf

Please sign in to comment.