6 isStatic ? stdenv.hostPlatform.isStatic,
9 stdenv.mkDerivation (finalAttrs: {
10 pname = "protoc-gen-grpc-web";
13 src = fetchFromGitHub {
16 rev = finalAttrs.version;
17 sha256 = "sha256-yqiSuqan4vynE3AS8OnYdzA+3AVlVFTBkxTuJe17114=";
20 sourceRoot = "${finalAttrs.src.name}/javascript/net/grpc/web/generator";
22 enableParallelBuilding = true;
24 nativeBuildInputs = [ protobuf ];
25 buildInputs = [ protobuf ];
29 "STATIC=${if isStatic then "yes" else "no"}"
33 nativeCheckInputs = [ protobuf ];
37 CHECK_TMPDIR="$TMPDIR/proto"
38 mkdir -p "$CHECK_TMPDIR"
41 --proto_path="$src/packages/grpc-web/test/protos" \
42 --plugin="./protoc-gen-grpc-web" \
43 --grpc-web_out="import_style=commonjs,mode=grpcwebtext:$CHECK_TMPDIR" \
46 # check for grpc-web generated file
47 [ -f "$CHECK_TMPDIR/echo_grpc_web_pb.js" ]
53 homepage = "https://github.com/grpc/grpc-web";
54 changelog = "https://github.com/grpc/grpc-web/blob/${finalAttrs.version}/CHANGELOG.md";
55 description = "gRPC web support for Google's protocol buffers";
56 mainProgram = "protoc-gen-grpc-web";
57 license = licenses.asl20;
58 maintainers = with maintainers; [ jk ];
59 platforms = platforms.unix;