forked from nix-community/ethereum.nix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'nix-community:main' into dev
- Loading branch information
Showing
13 changed files
with
183 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,60 @@ | ||
{ | ||
fetchurl, | ||
jemalloc, | ||
jre, | ||
lib, | ||
makeWrapper, | ||
runCommand, | ||
stdenv, | ||
testers, | ||
}: | ||
stdenv.mkDerivation rec { | ||
stdenv.mkDerivation (finalAttrs: rec { | ||
pname = "besu"; | ||
version = "24.1.2"; | ||
version = "24.3.3"; | ||
|
||
src = fetchurl { | ||
url = "https://hyperledger.jfrog.io/hyperledger/${pname}-binaries/${pname}/${version}/${pname}-${version}.tar.gz"; | ||
hash = "sha256-CC24z0+2dSeqDddX5dJUs7SX9QJ8Iyh/nAp0pqdDvwg="; | ||
hash = "sha256-ua7lGVIYf/VQ3kgfLAQFE3uF8dCqOCYWDfbX5QXzWa4="; | ||
}; | ||
|
||
buildInputs = lib.optionals stdenv.isLinux [jemalloc]; | ||
nativeBuildInputs = [makeWrapper]; | ||
|
||
installPhase = '' | ||
mkdir -p $out/bin | ||
cp -r bin $out/ | ||
mkdir -p $out/lib | ||
cp -r lib $out/ | ||
wrapProgram $out/bin/${pname} --set JAVA_HOME "${jre}" | ||
wrapProgram $out/bin/${pname} --set JAVA_HOME "${jre}" --suffix ${ | ||
if stdenv.isDarwin | ||
then "DYLD_LIBRARY_PATH" | ||
else "LD_LIBRARY_PATH" | ||
} : ${lib.makeLibraryPath buildInputs} | ||
''; | ||
|
||
passthru.tests = { | ||
version = testers.testVersion { | ||
package = finalAttrs.finalPackage; | ||
version = "v${version}"; | ||
}; | ||
jemalloc = | ||
runCommand "${pname}-test-jemalloc" | ||
{ | ||
nativeBuildInputs = [finalAttrs.finalPackage]; | ||
meta.platforms = with lib.platforms; linux; | ||
} '' | ||
# Expect to find this string in the output, ignore other failures. | ||
(besu 2>&1 || true) | grep -q "# jemalloc: ${jemalloc.version}" | ||
mkdir $out | ||
''; | ||
}; | ||
|
||
meta = with lib; { | ||
description = "Besu is an Apache 2.0 licensed, MainNet compatible, Ethereum client written in Java"; | ||
homepage = "https://github.com/hyperledger/besu"; | ||
license = licenses.asl20; | ||
mainProgram = "besu"; | ||
platforms = ["x86_64-linux"]; | ||
platforms = ["aarch64-darwin" "x86_64-linux"]; | ||
sourceProvenance = with sourceTypes; [binaryBytecode]; | ||
}; | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
lib, | ||
python3, | ||
fetchFromGitHub, | ||
}: | ||
python3.pkgs.buildPythonPackage rec { | ||
pname = "eth-validator-watcher"; | ||
version = "0.7.1"; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "kilnfi"; | ||
repo = pname; | ||
rev = "refs/tags/v${version}"; | ||
hash = "sha256-OhrThxzyuBSSdN/MM4wOj0yebVa219uQDW+o0xtsgTg="; | ||
}; | ||
|
||
nativeBuildInputs = with python3.pkgs; [ | ||
poetry-core | ||
]; | ||
|
||
propagatedBuildInputs = with python3.pkgs; [ | ||
typer | ||
prometheus-client | ||
pydantic | ||
requests | ||
slack-sdk | ||
tenacity | ||
more-itertools | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Ethereum validator monitor"; | ||
longDescription = '' Ethereum Validator Watcher monitors the Ethereum beacon | ||
chain in real-time and notifies you when your validators perform certain actions. ''; | ||
homepage = "https://github.com/kilnfi/eth-validator-watcher"; | ||
license = licenses.mit; | ||
platforms = ["x86_64-linux"]; | ||
}; | ||
} |
Oops, something went wrong.