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 sha256 = "sha256-UbRsY9fSUYAwPcLfGGDHeqvSsLKUKR+2a93jH5xA9uQ=";
21 vendorHash = "sha256-dOvpOCMxxmcAaticSLVlro1L4crAVJWyvgx/JZZ7buE=";
25 outputs = [ "out" ] ++ bins;
27 # Move binaries to separate outputs and symlink them back to $out
28 postInstall = lib.concatStringsSep "\n" (
29 builtins.map (bin: "mkdir -p \$${bin}/bin && mv $out/bin/${bin} \$${bin}/bin/ && ln -s \$${bin}/bin/${bin} $out/bin/") bins
47 # Following upstream: https://github.com/ethereum/go-ethereum/blob/v1.11.6/build/ci.go#L218
48 tags = [ "urfave_cli_no_docs" ];
50 # Fix for usb-related segmentation faults on darwin
51 propagatedBuildInputs =
52 lib.optionals stdenv.isDarwin [ libobjc IOKit ];
54 passthru.tests = { inherit (nixosTests) geth; };
57 homepage = "https://geth.ethereum.org/";
58 description = "Official golang implementation of the Ethereum protocol";
59 license = with licenses; [ lgpl3Plus gpl3Plus ];
60 maintainers = with maintainers; [ RaghavSood ];