Unverified Commit cf3bfe7b authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #257967 from aaronjheng/quorum

quorum: 2.5.0 -> 23.4.0
parents 327def42 ebfac7d5
Loading
Loading
Loading
Loading
+17 −23
Original line number Diff line number Diff line
{ lib, fetchFromGitHub, buildGoPackage, git, which, removeReferencesTo, go }:
{ lib, fetchFromGitHub, buildGoModule }:

buildGoPackage rec {
buildGoModule rec {
  pname = "quorum";
  version = "2.5.0";

  goPackagePath = "github.com/jpmorganchase/quorum";
  version = "23.4.0";

  src = fetchFromGitHub {
    owner = "jpmorganchase";
    owner = "Consensys";
    repo = pname;
    rev = "v${version}";
    sha256 = "0xfdaqp9bj5dkw12gy19lxj73zh7w80j051xclsvnd41sfah86ll";
    hash = "sha256-N8MlDHo6LQ/m9xFUeOCm6bqDtjnCc86i/s4ebFLjUT0=";
  };

  buildInputs = [ git which ];
  vendorHash = "sha256-dTYKGFqVaAnspvKhfBU10bpSzhtQHGTm6KxnNKUVAIg=";

  buildPhase = ''
    cd "go/src/$goPackagePath"
    make geth bootnode swarm
  '';
  patches = [
    # Add missing requirements
    ./go.mod.patch
  ];

  installPhase = ''
    mkdir -pv $out/bin
    cp -v build/bin/geth build/bin/bootnode build/bin/swarm $out/bin
  '';
  subPackages = [
    "cmd/geth"
    "cmd/bootnode"
  ];

  # fails with `GOFLAGS=-trimpath`
  allowGoReference = true;
  preFixup = ''
    find $out -type f -exec ${removeReferencesTo}/bin/remove-references-to -t ${go} '{}' +
  '';
  ldflags = [ "-s" "-w" ];

  meta = with lib; {
    description = "A permissioned implementation of Ethereum supporting data privacy";
    homepage = "https://www.goquorum.com/";
    homepage = "https://consensys.net/quorum/";
    license = licenses.lgpl3;
    maintainers = with maintainers; [ mmahut ];
    platforms = subtractLists ["aarch64-linux"] platforms.linux;
    platforms = [ "x86_64-linux" "x86_64-darwin" ];
  };
}
+12 −0
Original line number Diff line number Diff line
diff --git a/go.mod b/go.mod
index ace412f41..3336c1e08 100644
--- a/go.mod
+++ b/go.mod
@@ -89,6 +89,7 @@ require (
 	golang.org/x/text v0.3.7
 	golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
 	google.golang.org/grpc v1.46.0
+	google.golang.org/protobuf v1.28.0
 	gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
 	gopkg.in/karalabe/cookiejar.v2 v2.0.0-20150724131613-8dcd6a7f4951
 	gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce