3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #116531 from SuperSandro2000/grpc

This commit is contained in:
Sandro 2021-03-26 17:45:58 +01:00 committed by GitHub
commit 362a2fb63f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 16 deletions

View file

@ -9,10 +9,8 @@
, doxygen , doxygen
, protobuf , protobuf
, crc32c , crc32c
, c-ares
, fetchurl , fetchurl
, openssl , openssl
, zlib
, libnsl , libnsl
}: }:
let let
@ -33,7 +31,7 @@ let
}; };
nativeBuildInputs = [ cmake pkg-config ]; nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ c-ares c-ares.cmake-config grpc openssl protobuf zlib ]; buildInputs = [ grpc openssl protobuf ];
postPatch = '' postPatch = ''
sed -e 's,https://github.com/googleapis/googleapis/archive/9c9f778aedde02f9826d2ae5d0f9c96409ba0f25.tar.gz,file://${googleapis},' \ sed -e 's,https://github.com/googleapis/googleapis/archive/9c9f778aedde02f9826d2ae5d0f9c96409ba0f25.tar.gz,file://${googleapis},' \
@ -55,7 +53,7 @@ in stdenv.mkDerivation rec {
sha256 = "15wci4m8h6py7fqfziq8mp5m6pxp2h1cbh5rp2k90mk5js4jb9pa"; sha256 = "15wci4m8h6py7fqfziq8mp5m6pxp2h1cbh5rp2k90mk5js4jb9pa";
}; };
buildInputs = [ curl crc32c c-ares c-ares.cmake-config googleapis-cpp-cmakefiles grpc protobuf libnsl ]; buildInputs = [ curl crc32c googleapis-cpp-cmakefiles grpc protobuf libnsl ];
nativeBuildInputs = [ clang-tools cmake pkg-config doxygen ]; nativeBuildInputs = [ clang-tools cmake pkg-config doxygen ];
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];

View file

@ -1,12 +1,8 @@
{ stdenv, lib, fetchFromGitHub, pkg-config, cmake { stdenv, lib, fetchFromGitHub, pkg-config, cmake
, opentracing-cpp, protobuf, zlib , opentracing-cpp, protobuf
, enableGrpc ? false, grpc ? null, openssl ? null, c-ares ? null , enableGrpc ? false, grpc, openssl
}: }:
assert enableGrpc -> grpc != null;
assert enableGrpc -> openssl != null;
assert enableGrpc -> c-ares != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "lightstep-tracer-cpp"; pname = "lightstep-tracer-cpp";
version = "0.14.0"; version = "0.14.0";
@ -23,9 +19,9 @@ stdenv.mkDerivation rec {
]; ];
buildInputs = [ buildInputs = [
opentracing-cpp protobuf zlib opentracing-cpp protobuf
] ++ lib.optionals enableGrpc [ ] ++ lib.optionals enableGrpc [
grpc openssl c-ares c-ares.cmake-config grpc openssl
]; ];
cmakeFlags = lib.optionals (!enableGrpc) [ "-DWITH_GRPC=OFF" ]; cmakeFlags = lib.optionals (!enableGrpc) [ "-DWITH_GRPC=OFF" ];

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub, cmake, kernel, installShellFiles { lib, stdenv, fetchFromGitHub, cmake, kernel, installShellFiles
, luajit, zlib, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc, elfutils, tbb, c-ares, protobuf, grpc , luajit, ncurses, perl, jsoncpp, libb64, openssl, curl, jq, gcc, elfutils, tbb, protobuf, grpc
}: }:
with lib; with lib;
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake perl installShellFiles ]; nativeBuildInputs = [ cmake perl installShellFiles ];
buildInputs = [ buildInputs = [
zlib luajit ncurses jsoncpp libb64 openssl curl jq gcc elfutils tbb c-ares protobuf grpc luajit ncurses jsoncpp libb64 openssl curl jq gcc elfutils tbb protobuf grpc
] ++ optionals (kernel != null) kernel.moduleBuildDependencies; ] ++ optionals (kernel != null) kernel.moduleBuildDependencies;
hardeningDisable = [ "pic" ]; hardeningDisable = [ "pic" ];

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchgit, fetchurl, git, cmake, pkg-config { lib, stdenv, fetchgit, fetchurl, git, cmake, pkg-config
, openssl, zlib, boost, grpc, c-ares, abseil-cpp, protobuf3_8, libnsl }: , openssl, boost, grpc, abseil-cpp, protobuf3_8, libnsl }:
let let
sqlite3 = fetchurl rec { sqlite3 = fetchurl rec {
@ -130,7 +130,7 @@ in stdenv.mkDerivation rec {
cmakeFlags = ["-Dstatic=OFF" "-DBoost_NO_BOOST_CMAKE=ON"]; cmakeFlags = ["-Dstatic=OFF" "-DBoost_NO_BOOST_CMAKE=ON"];
nativeBuildInputs = [ pkg-config cmake git ]; nativeBuildInputs = [ pkg-config cmake git ];
buildInputs = [ openssl openssl.dev boostSharedStatic zlib grpc c-ares c-ares.cmake-config abseil-cpp protobuf3_8 libnsl ]; buildInputs = [ openssl openssl.dev boostSharedStatic grpc abseil-cpp protobuf3_8 libnsl ];
preConfigure = '' preConfigure = ''
export HOME=$PWD export HOME=$PWD