-
Notifications
You must be signed in to change notification settings - Fork 242
/
Copy pathgo-ethereum.nix
78 lines (68 loc) · 1.47 KB
/
go-ethereum.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
libobjc,
IOKit,
}:
let
# A list of binaries to put into separate outputs
bins = [
"geth"
"clef"
];
in
buildGoModule rec {
pname = "go-ethereum";
version = "1.11.6";
src = fetchFromGitHub {
owner = "ethereum";
repo = pname;
rev = "v${version}";
sha256 = "sha256-mZ11xan3MGgaUORbiQczKrXSrxzjvQMhZbpHnEal11Y=";
};
vendorHash = "sha256-rjSGR2ie5sFK2OOo4HUZ6+hrDlQuUDtyTKn0sh8jFBY=";
doCheck = false;
outputs = [ "out" ] ++ bins;
# Move binaries to separate outputs and symlink them back to $out
postInstall = lib.concatStringsSep "\n" (
builtins.map (
bin:
"mkdir -p \$${bin}/bin && mv $out/bin/${bin} \$${bin}/bin/ && ln -s \$${bin}/bin/${bin} $out/bin/"
) bins
);
subPackages = [
"cmd/abidump"
"cmd/abigen"
"cmd/bootnode"
"cmd/checkpoint-admin"
"cmd/clef"
"cmd/devp2p"
"cmd/ethkey"
"cmd/evm"
"cmd/faucet"
"cmd/geth"
"cmd/p2psim"
"cmd/rlpdump"
"cmd/utils"
];
# Fix for usb-related segmentation faults on darwin
propagatedBuildInputs = lib.optionals stdenv.isDarwin [
libobjc
IOKit
];
meta = with lib; {
homepage = "https://geth.ethereum.org/";
description = "Official golang implementation of the Ethereum protocol";
license = with licenses; [
lgpl3Plus
gpl3Plus
];
maintainers = with maintainers; [
adisbladis
lionello
RaghavSood
];
};
}