Skip to content

Commit 471fbe3

Browse files
authored
Merge branch 'nix-community:main' into dev
2 parents 9594731 + 6b4208f commit 471fbe3

File tree

13 files changed

+183
-354
lines changed

13 files changed

+183
-354
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</a>
1515
</p>
1616

17-
Ethereum.nix is a collection of [Nix](https://nixos.org) packages and [NixOS](https://nixos.wiki/wiki/NixOS_modules) modules
17+
Ethereum.nix is a collection of [Nix](https://nixos.org) packages and [NixOS](https://wiki.nixos.org/wiki/NixOS_modules) modules
1818
designed to make it easier to operate [Ethereum](https://ethereum.org) related services and infrastructure.
1919

2020
For the uninitiated, using Ethereum.nix will give you the following benefits:

docs/apps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Utilities and applications can't be categorized into any category of the above.
115115
| [ethdo](https://github.com/wealdtech/ethdo) | `nix run .#ethdo` |
116116
| [ethereal](https://github.com/wealdtech/ethereal) | `nix run .#ethereal` |
117117
| [sedge](https://github.com/NethermindEth/sedge) | `nix run .#sedge` |
118-
| [staking-deposit-cli](https://github.com/ethereum/staking-deposit-cli) | `nix run .#deposit` |
118+
| [staking-deposit-cli](https://github.com/ethereum/staking-deposit-cli) | `nix run .#staking-deposit-cli` |
119119
| [tx-fuzz](https://github.com/MariusVanDerWijden/tx-fuzz) | `nix run .#tx-fuzz` |
120120
| [zcli](https://github.com/protolambda/zcli) | `nix run .#zcli` |
121121

flake.lock

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

pkgs/besu/default.nix

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,60 @@
11
{
22
fetchurl,
3+
jemalloc,
34
jre,
45
lib,
56
makeWrapper,
7+
runCommand,
68
stdenv,
9+
testers,
710
}:
8-
stdenv.mkDerivation rec {
11+
stdenv.mkDerivation (finalAttrs: rec {
912
pname = "besu";
10-
version = "24.1.2";
13+
version = "24.3.3";
1114

1215
src = fetchurl {
1316
url = "https://hyperledger.jfrog.io/hyperledger/${pname}-binaries/${pname}/${version}/${pname}-${version}.tar.gz";
14-
hash = "sha256-CC24z0+2dSeqDddX5dJUs7SX9QJ8Iyh/nAp0pqdDvwg=";
17+
hash = "sha256-ua7lGVIYf/VQ3kgfLAQFE3uF8dCqOCYWDfbX5QXzWa4=";
1518
};
1619

20+
buildInputs = lib.optionals stdenv.isLinux [jemalloc];
1721
nativeBuildInputs = [makeWrapper];
1822

1923
installPhase = ''
2024
mkdir -p $out/bin
2125
cp -r bin $out/
2226
mkdir -p $out/lib
2327
cp -r lib $out/
24-
wrapProgram $out/bin/${pname} --set JAVA_HOME "${jre}"
28+
wrapProgram $out/bin/${pname} --set JAVA_HOME "${jre}" --suffix ${
29+
if stdenv.isDarwin
30+
then "DYLD_LIBRARY_PATH"
31+
else "LD_LIBRARY_PATH"
32+
} : ${lib.makeLibraryPath buildInputs}
2533
'';
2634

35+
passthru.tests = {
36+
version = testers.testVersion {
37+
package = finalAttrs.finalPackage;
38+
version = "v${version}";
39+
};
40+
jemalloc =
41+
runCommand "${pname}-test-jemalloc"
42+
{
43+
nativeBuildInputs = [finalAttrs.finalPackage];
44+
meta.platforms = with lib.platforms; linux;
45+
} ''
46+
# Expect to find this string in the output, ignore other failures.
47+
(besu 2>&1 || true) | grep -q "# jemalloc: ${jemalloc.version}"
48+
mkdir $out
49+
'';
50+
};
51+
2752
meta = with lib; {
2853
description = "Besu is an Apache 2.0 licensed, MainNet compatible, Ethereum client written in Java";
2954
homepage = "https://github.com/hyperledger/besu";
3055
license = licenses.asl20;
3156
mainProgram = "besu";
32-
platforms = ["x86_64-linux"];
57+
platforms = ["aarch64-darwin" "x86_64-linux"];
3358
sourceProvenance = with sourceTypes; [binaryBytecode];
3459
};
35-
}
60+
})

pkgs/default.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
});
3838
eth2-testnet-genesis = callPackage ./eth2-testnet-genesis {inherit bls;};
3939
eth2-val-tools = callPackage ./eth2-val-tools {inherit bls mcl;};
40+
eth-validator-watcher = callPackage ./eth-validator-watcher {};
4041
ethdo = callPackage ./ethdo {inherit bls mcl;};
4142
ethereal = callPackage ./ethereal {inherit bls mcl;};
4243
evmc = callPackage ./evmc {};
@@ -71,6 +72,7 @@
7172
rotki-bin = callPackage ./rotki-bin {};
7273
sedge = callPackage ./sedge {inherit bls mcl;};
7374
slither = callPackage ./slither {};
75+
snarkjs = callPackage ./snarkjs {};
7476
ssvnode = callPackage ./ssvnode {inherit bls mcl;};
7577
staking-deposit-cli = callPackage ./staking-deposit-cli {};
7678
teku = callPackage ./teku {};
@@ -138,6 +140,7 @@
138140
rotki-bin.bin = "rotki";
139141
sedge.bin = "sedge";
140142
slither.bin = "slither";
143+
snarkjs.bin = "snarkjs";
141144
ssvnode.bin = "ssvnode";
142145
staking-deposit-cli.bin = "deposit";
143146
teku.bin = "teku";
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
lib,
3+
python3,
4+
fetchFromGitHub,
5+
}:
6+
python3.pkgs.buildPythonPackage rec {
7+
pname = "eth-validator-watcher";
8+
version = "0.7.1";
9+
pyproject = true;
10+
11+
src = fetchFromGitHub {
12+
owner = "kilnfi";
13+
repo = pname;
14+
rev = "refs/tags/v${version}";
15+
hash = "sha256-OhrThxzyuBSSdN/MM4wOj0yebVa219uQDW+o0xtsgTg=";
16+
};
17+
18+
nativeBuildInputs = with python3.pkgs; [
19+
poetry-core
20+
];
21+
22+
propagatedBuildInputs = with python3.pkgs; [
23+
typer
24+
prometheus-client
25+
pydantic
26+
requests
27+
slack-sdk
28+
tenacity
29+
more-itertools
30+
];
31+
32+
meta = with lib; {
33+
description = "Ethereum validator monitor";
34+
longDescription = '' Ethereum Validator Watcher monitors the Ethereum beacon
35+
chain in real-time and notifies you when your validators perform certain actions. '';
36+
homepage = "https://github.com/kilnfi/eth-validator-watcher";
37+
license = licenses.mit;
38+
platforms = ["x86_64-linux"];
39+
};
40+
}

0 commit comments

Comments
 (0)