2023-08-10 07:59:29 +00:00
|
|
|
{ lib, fetchFromGitHub, gerbilPackages, gerbil-support, gerbil, ... }:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
rec {
|
2020-08-20 17:08:02 +00:00
|
|
|
pname = "gerbil-ethereum";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "unstable-2023-12-04";
|
|
|
|
git-version = "0.2-11-g124ec58";
|
2023-08-10 07:59:29 +00:00
|
|
|
softwareName = "Gerbil-ethereum";
|
2023-10-19 13:55:26 +00:00
|
|
|
gerbil-package = "clan/ethereum";
|
2020-08-20 17:08:02 +00:00
|
|
|
version-path = "version";
|
2023-08-10 07:59:29 +00:00
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
gerbilInputs = with gerbilPackages; [
|
|
|
|
gerbil-utils gerbil-crypto gerbil-poo gerbil-persist gerbil-leveldb ];
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
pre-src = {
|
|
|
|
fun = fetchFromGitHub;
|
2023-10-19 13:55:26 +00:00
|
|
|
owner = "mighty-gerbils";
|
2020-08-20 17:08:02 +00:00
|
|
|
repo = "gerbil-ethereum";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "124ec585157e2c505cd3c449a389c124ca6da9e9";
|
|
|
|
sha256 = "0xg07k421r5p0qx98id66k0k2l3vi1is875857sd8q3h6bks0z54";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2023-10-19 13:55:26 +00:00
|
|
|
cp scripts/{croesus.prv,genesis.json,logback.xml,yolo-evm.conf,yolo-kevm.conf,run-ethereum-test-net.ss} $out/gerbil/lib/clan/ethereum/scripts/
|
2023-08-10 07:59:29 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
cat > $out/bin/run-ethereum-test-net <<EOF
|
|
|
|
#!/bin/sh
|
|
|
|
#|
|
|
|
|
ORIG_GERBIL_LOADPATH="\$GERBIL_LOADPATH"
|
|
|
|
ORIG_GERBIL_PATH="\$GERBIL_PATH"
|
|
|
|
ORIG_GERBIL_HOME="\$GERBIL_HOME"
|
|
|
|
unset GERBIL_HOME
|
|
|
|
GERBIL_LOADPATH="${gerbil-support.gerbilLoadPath (["$out"] ++ gerbilInputs)}"
|
|
|
|
GERBIL_PATH="\$HOME/.cache/gerbil-ethereum/gerbil"
|
|
|
|
export GERBIL_PATH GERBIL_LOADPATH GLOW_SOURCE ORIG_GERBIL_PATH ORIG_GERBIL_LOADPATH
|
|
|
|
exec ${gerbil}/bin/gxi "\$0" "\$@"
|
|
|
|
|#
|
2024-01-02 11:29:13 +00:00
|
|
|
(import :clan/ethereum/scripts/run-ethereum-test-net :std/lib/multicall)
|
2023-08-10 07:59:29 +00:00
|
|
|
(apply call-entry-point (cdr (command-line)))
|
|
|
|
EOF
|
|
|
|
chmod a+x $out/bin/run-ethereum-test-net
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-08-20 17:08:02 +00:00
|
|
|
description = "Gerbil Ethereum: a Scheme alternative to web3.js";
|
|
|
|
homepage = "https://github.com/fare/gerbil-ethereum";
|
2023-08-10 07:59:29 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ fare ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|