mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
Merge pull request #221501 from 06kellyjac/master
protoc-gen-grpc-web: 1.3.1 -> 1.4.2
This commit is contained in:
commit
e1c33cf961
@ -1,27 +1,31 @@
|
||||
{ lib, stdenv, fetchFromGitHub, protobuf }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, protobuf
|
||||
, isStatic ? stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "protoc-gen-grpc-web";
|
||||
version = "1.3.1";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grpc";
|
||||
repo = "grpc-web";
|
||||
rev = version;
|
||||
sha256 = "sha256-NRShN4X9JmCjqPVY/q9oSxSOvv1bP//vM9iOZ6ap5vc=";
|
||||
rev = finalAttrs.version;
|
||||
sha256 = "sha256-OetDAZ6zC8r7e82FILpQQnM+JHG9eludwhEuPaklrnw=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/javascript/net/grpc/web/generator";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ protobuf ];
|
||||
buildInputs = [ protobuf ];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" "STATIC=no" ];
|
||||
|
||||
patches = [
|
||||
# https://github.com/grpc/grpc-web/pull/1210
|
||||
./optional-static.patch
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"STATIC=${if isStatic then "yes" else "no"}"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
@ -33,7 +37,7 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p "$CHECK_TMPDIR"
|
||||
|
||||
protoc \
|
||||
--proto_path="${src}/packages/grpc-web/test/protos" \
|
||||
--proto_path="$src/packages/grpc-web/test/protos" \
|
||||
--plugin="./protoc-gen-grpc-web" \
|
||||
--grpc-web_out="import_style=commonjs,mode=grpcwebtext:$CHECK_TMPDIR" \
|
||||
echo.proto
|
||||
@ -46,10 +50,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/grpc/grpc-web";
|
||||
changelog = "https://github.com/grpc/grpc-web/blob/${version}/CHANGELOG.md";
|
||||
changelog = "https://github.com/grpc/grpc-web/blob/${finalAttrs.version}/CHANGELOG.md";
|
||||
description = "gRPC web support for Google's protocol buffers";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jk ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,19 +0,0 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -18,12 +18,15 @@ CXXFLAGS += -std=c++11
|
||||
LDFLAGS += -L/usr/local/lib -lprotoc -lprotobuf -lpthread -ldl
|
||||
PREFIX ?= /usr/local
|
||||
MIN_MACOS_VERSION := 10.7 # Supports OS X Lion
|
||||
+STATIC ?= yes
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$(MIN_MACOS_VERSION)
|
||||
else ifeq ($(UNAME_S),Linux)
|
||||
- LDFLAGS += -static
|
||||
+ ifeq ($(STATIC),yes)
|
||||
+ LDFLAGS += -static
|
||||
+ endif
|
||||
endif
|
||||
|
||||
all: protoc-gen-grpc-web
|
Loading…
Reference in New Issue
Block a user