diff --git a/flake.nix b/flake.nix index 0f9685ae0..50cdd485b 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,7 @@ in rec { packages = rec { + zeth = (pkgs.callPackage ./nix/zeth.nix { }); solc = (pkgs.callPackage ./nix/solc.nix { }); rollup-bridge-contracts = (pkgs.callPackage ./nix/rollup-bridge-contracts.nix { }); nil = (pkgs.callPackage ./nix/nil.nix { @@ -155,6 +156,9 @@ chmod -R u+rwx,g+rx,o+rx ./usr/share/${packages.nilexplorer.name} chmod -R u+rwx,g+rx,o+rx ./usr/share/${packages.docsaibackend.name} + # copy file after set permitions for /usr/bin + cp ${packages.zeth.outPath}/bin/zeth-ethereum ./usr/bin/zeth-ethereum + mv ./usr/bin/cometa ./usr/bin/nil-cometa mv ./usr/bin/indexer ./usr/bin/nil-indexer diff --git a/nix/zeth.nix b/nix/zeth.nix new file mode 100644 index 000000000..0d3f5d7f3 --- /dev/null +++ b/nix/zeth.nix @@ -0,0 +1,36 @@ +{ lib +, gccStdenv +, fetchurl +, pkgs +}: + +let + pname = "zeth"; + version = "0.1.0"; + meta = with lib; { + description = "Reference tool for rexecute blocks"; + homepage = "https://github.com/akokoshn/zeth"; + # license = licenses.apache; + }; + + zeth = + gccStdenv.mkDerivation + rec { + inherit pname version meta; + + executable = fetchurl { + url = "https://github.com/akokoshn/zeth/releases/download/dev/zeth-ethereum"; + sha256 = "sha256-HXbw7RfiTR4+CMdryWvR/0YpaLK8fsccSxameBkJqIk="; + }; + + phases = [ "installPhase" ]; + + installPhase = '' + echo "Install Zeth" + mkdir -p $out/bin + cp ${executable} $out/bin/zeth-ethereum + chmod 777 $out/bin/zeth-ethereum + ''; + }; +in +zeth