turnon: 2.0.0 -> 2.3.1 (#370430)
[NixPkgs.git] / pkgs / by-name / gr / grpc-tools / package.nix
blob5bf09b7f0b940ab5eda84bc958b5c158472a0638
2   lib,
3   stdenv,
4   cmake,
5   fetchFromGitHub,
6   gitUpdater,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "grpc-tools";
11   version = "1.12.4";
13   src = fetchFromGitHub {
14     owner = "grpc";
15     repo = "grpc-node";
16     rev = "grpc-tools@${version}";
17     hash = "sha256-708lBIGW5+vvSTrZHl/kc+ck7JKNXElrghIGDrMSyx8=";
18     fetchSubmodules = true;
19   };
21   sourceRoot = "${src.name}/packages/grpc-tools";
23   nativeBuildInputs = [ cmake ];
25   installPhase = ''
26     install -Dm755 -t $out/bin grpc_node_plugin
27     install -Dm755 -t $out/bin deps/protobuf/protoc
28   '';
30   passthru.updateScript = gitUpdater {
31     url = "https://github.com/grpc/grpc-node.git";
32     rev-prefix = "grpc-tools@";
33   };
35   meta = with lib; {
36     description = "Distribution of protoc and the gRPC Node protoc plugin for ease of installation with npm";
37     longDescription = ''
38       This package distributes the Protocol Buffers compiler protoc along with
39       the plugin for generating client and service objects for use with the Node
40       gRPC libraries.
41     '';
42     homepage = "https://github.com/grpc/grpc-node/tree/master/packages/grpc-tools";
43     license = licenses.asl20;
44     platforms = platforms.all;
45     maintainers = [ maintainers.nzhang-zh ];
46   };