1 { lib, stdenv, buildGoModule, fetchFromGitHub, libobjc, IOKit, nixosTests }:
4 # A list of binaries to put into separate outputs
10 in buildGoModule rec {
11 pname = "go-ethereum";
14 src = fetchFromGitHub {
18 hash = "sha256-y4tUV5TGhvvaLTukT0jVhoBWxXQlDFVKHScQC8Ytl/A=";
22 vendorHash = "sha256-xPFTvzsHMWVyeAt7m++6v2l8m5ZvnLaIDGki/TWe5kU=";
26 outputs = [ "out" ] ++ bins;
28 # Move binaries to separate outputs and symlink them back to $out
29 postInstall = lib.concatStringsSep "\n" (
30 builtins.map (bin: "mkdir -p \$${bin}/bin && mv $out/bin/${bin} \$${bin}/bin/ && ln -s \$${bin}/bin/${bin} $out/bin/") bins
48 # Following upstream: https://github.com/ethereum/go-ethereum/blob/v1.11.6/build/ci.go#L218
49 tags = [ "urfave_cli_no_docs" ];
51 # Fix for usb-related segmentation faults on darwin
52 propagatedBuildInputs =
53 lib.optionals stdenv.hostPlatform.isDarwin [ libobjc IOKit ];
55 passthru.tests = { inherit (nixosTests) geth; };
58 homepage = "https://geth.ethereum.org/";
59 description = "Official golang implementation of the Ethereum protocol";
60 license = with licenses; [ lgpl3Plus gpl3Plus ];
61 maintainers = with maintainers; [ RaghavSood ];