Skip to content

Commit 16a8b5b

Browse files
committed
Add Zeth to the nil package
- Download binary from github release - Add to the nil package under /usr/bin
1 parent 3e77fd3 commit 16a8b5b

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
in
2929
rec {
3030
packages = rec {
31+
zeth = (pkgs.callPackage ./nix/zeth.nix { });
3132
solc = (pkgs.callPackage ./nix/solc.nix { });
3233
rollup-bridge-contracts = (pkgs.callPackage ./nix/rollup-bridge-contracts.nix { });
3334
nil = (pkgs.callPackage ./nix/nil.nix {
@@ -155,6 +156,9 @@
155156
chmod -R u+rwx,g+rx,o+rx ./usr/share/${packages.nilexplorer.name}
156157
chmod -R u+rwx,g+rx,o+rx ./usr/share/${packages.docsaibackend.name}
157158
159+
# copy file after set permitions for /usr/bin
160+
cp ${packages.zeth.outPath}/bin/zeth-ethereum ./usr/bin/zeth-ethereum
161+
158162
mv ./usr/bin/cometa ./usr/bin/nil-cometa
159163
mv ./usr/bin/indexer ./usr/bin/nil-indexer
160164

nix/zeth.nix

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{ lib
2+
, gccStdenv
3+
, fetchurl
4+
, pkgs
5+
}:
6+
7+
let
8+
pname = "zeth";
9+
version = "0.1.0";
10+
meta = with lib; {
11+
description = "Reference tool for rexecute blocks";
12+
homepage = "https://github.com/akokoshn/zeth";
13+
# license = licenses.apache;
14+
};
15+
16+
zeth =
17+
gccStdenv.mkDerivation
18+
rec {
19+
inherit pname version meta;
20+
21+
executable = fetchurl {
22+
url = "https://github.com/akokoshn/zeth/releases/download/dev/zeth-ethereum";
23+
sha256 = "sha256-HXbw7RfiTR4+CMdryWvR/0YpaLK8fsccSxameBkJqIk=";
24+
};
25+
26+
phases = [ "installPhase" ];
27+
28+
installPhase = ''
29+
echo "Install Zeth"
30+
mkdir -p $out/bin
31+
cp ${executable} $out/bin/zeth-ethereum
32+
chmod 777 $out/bin/zeth-ethereum
33+
'';
34+
};
35+
in
36+
zeth

0 commit comments

Comments
 (0)