1{ lib, fetchFromGitHub, buildGoPackage, git, which, removeReferencesTo, go }:
2
3buildGoPackage rec {
4 pname = "quorum";
5 version = "2.5.0";
6
7 goPackagePath = "github.com/jpmorganchase/quorum";
8
9 src = fetchFromGitHub {
10 owner = "jpmorganchase";
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "0xfdaqp9bj5dkw12gy19lxj73zh7w80j051xclsvnd41sfah86ll";
14 };
15
16 buildInputs = [ git which ];
17
18 buildPhase = ''
19 cd "go/src/$goPackagePath"
20 make geth bootnode swarm
21 '';
22
23 installPhase = ''
24 mkdir -pv $out/bin
25 cp -v build/bin/geth build/bin/bootnode build/bin/swarm $out/bin
26 '';
27
28 # fails with `GOFLAGS=-trimpath`
29 allowGoReference = true;
30 preFixup = ''
31 find $out -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${go} '{}' +
32 '';
33
34 meta = with lib; {
35 description = "A permissioned implementation of Ethereum supporting data privacy";
36 homepage = "https://www.goquorum.com/";
37 license = licenses.lgpl3;
38 maintainers = with maintainers; [ mmahut ];
39 platforms = subtractLists ["aarch64-linux"] platforms.linux;
40 };
41}