diff --git a/pkgs/default.nix b/pkgs/default.nix index 08119bcf..faa9d0f4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -46,6 +46,7 @@ }); geth = callPackage ./geth {}; geth-sealer = callPackage ./geth-sealer {}; + geth-hdwallet = callPackage ./geth-hdwallet {}; heimdall = callPackage ./heimdall {}; lighthouse = callPackageUnstable ./lighthouse {inherit foundry;}; mcl = callPackage ./mcl {}; @@ -105,6 +106,7 @@ geth-rlpdump.bin = "rlpdump"; }; geth-sealer.bin = "geth"; + geth-hdwallet.bin = "geth-hdwallet"; lighthouse.bin = "lighthouse"; mev-boost-builder.bin = "geth"; mev-boost-prysm.bin = "beacon-chain"; diff --git a/pkgs/geth-hdwallet/default.nix b/pkgs/geth-hdwallet/default.nix new file mode 100644 index 00000000..905421e6 --- /dev/null +++ b/pkgs/geth-hdwallet/default.nix @@ -0,0 +1,36 @@ +{ + buildGoModule, + fetchFromGitHub, + lib, +}: +buildGoModule rec { + pname = "go-ethereum-hdwallet"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "miguelmota"; + repo = "go-ethereum-hdwallet"; + rev = "v${version}"; + hash = "sha256-sB2da9jukP6eTOU2w8e/J10xj/6LXapB0eogErmEPlA="; + }; + + postPatch = '' + rm -rf vendor + ''; + + vendorHash = "sha256-SUqWVZe5Y0pBeRP7Zrp4WzvAB+lFkQioqJhi4L/Rqvs="; + + ldflags = ["-s" "-w"]; + + doCheck = true; + + subPackages = ["cmd/geth-hdwallet"]; + + meta = with lib; { + description = "Ethereum HD Wallet derivations in Go (golang)"; + homepage = "https://github.com/miguelmota/go-ethereum-hdwallet"; + license = with licenses; [mit]; + mainProgram = "geth-hdwallet"; + platforms = ["x86_64-linux"]; + }; +}