blob: 3beb38e0d2dd99f3916e358b3f1ac6703c6fe801 (
plain) (
blame)
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
|
{ stdenv, lib, go, fetchgit }:
stdenv.mkDerivation rec {
name = "go-ethereum-${version}";
version = "1.4.7";
rev = "refs/tags/v${version}";
goPackagePath = "github.com/ethereum/go-ethereum";
buildInputs = [ go ];
src = fetchgit {
inherit rev;
url = "https://${goPackagePath}";
sha256 = "19q518kxkvrr44cvsph4wv3lr6ivqsckz1f22r62932s3sq6gyd8";
};
buildPhase = ''
export GOROOT=$(mktemp -d --suffix=-goroot)
ln -sv ${go}/share/go/* $GOROOT
ln -svf ${go}/bin $GOROOT
make all
'';
installPhase = ''
mkdir -p $out/bin
cp -v build/bin/* $out/bin
'';
meta = {
homepage = "https://ethereum.github.io/go-ethereum/";
description = "Official golang implementation of the Ethereum protocol";
license = with lib.licenses; [ lgpl3 gpl3 ];
};
}
|