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