uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
55
pkgs/development/tools/protoc-gen-grpc-web/default.nix
Normal file
55
pkgs/development/tools/protoc-gen-grpc-web/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, fetchFromGitHub, protobuf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "protoc-gen-grpc-web";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "grpc";
|
||||
repo = "grpc-web";
|
||||
rev = version;
|
||||
sha256 = "sha256-NRShN4X9JmCjqPVY/q9oSxSOvv1bP//vM9iOZ6ap5vc=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/javascript/net/grpc/web/generator";
|
||||
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ protobuf ];
|
||||
buildInputs = [ protobuf ];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" "STATIC=no" ];
|
||||
|
||||
patches = [
|
||||
# https://github.com/grpc/grpc-web/pull/1210
|
||||
./optional-static.patch
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ protobuf ];
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
CHECK_TMPDIR="$TMPDIR/proto"
|
||||
mkdir -p "$CHECK_TMPDIR"
|
||||
|
||||
protoc \
|
||||
--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
|
||||
|
||||
# check for grpc-web generated file
|
||||
[ -f "$CHECK_TMPDIR/echo_grpc_web_pb.js" ]
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/grpc/grpc-web";
|
||||
changelog = "https://github.com/grpc/grpc-web/blob/${version}/CHANGELOG.md";
|
||||
description = "gRPC web support for Google's protocol buffers";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ jk ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
--- 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…
Add table
Add a link
Reference in a new issue