mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
Add grpc.
This commit is contained in:
parent
9d7883374c
commit
6d3ff29d03
@ -1,5 +1,6 @@
|
||||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, writeTextDir }:
|
||||
|
||||
let self =
|
||||
stdenv.mkDerivation rec {
|
||||
name = "c-ares-1.13.0";
|
||||
|
||||
@ -14,4 +15,28 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
# Adapted from running a cmake build
|
||||
passthru.cmake-config = writeTextDir "c-ares-config.cmake"
|
||||
''
|
||||
set(c-ares_INCLUDE_DIR "${self}/include")
|
||||
|
||||
set(c-ares_LIBRARY c-ares::cares)
|
||||
|
||||
add_library(c-ares::cares SHARED IMPORTED)
|
||||
|
||||
set_target_properties(c-ares::cares PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${self}/include"
|
||||
INTERFACE_LINK_LIBRARIES "nsl;rt"
|
||||
)
|
||||
set_property(TARGET c-ares::cares APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(c-ares::cares PROPERTIES
|
||||
IMPORTED_LOCATION_RELEASE "${self}/lib/libcares.so.2.2.0"
|
||||
IMPORTED_SONAME_RELEASE "libcares.so.2"
|
||||
)
|
||||
add_library(c-ares::cares_shared INTERFACE IMPORTED)
|
||||
set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
|
||||
set(c-ares_SHARED_LIBRARY c-ares::cares_shared)
|
||||
'';
|
||||
|
||||
}; in self
|
||||
|
19
pkgs/development/libraries/c-ares/release.patch
Normal file
19
pkgs/development/libraries/c-ares/release.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -aur c-ares-cares-1_13_0/ares_version.h c-ares-1.13.0/ares_version.h
|
||||
--- c-ares-cares-1_13_0/ares_version.h 2017-06-20 02:00:21.000000000 -0400
|
||||
+++ c-ares-1.13.0/ares_version.h 2017-06-20 02:03:54.000000000 -0400
|
||||
@@ -6,12 +6,12 @@
|
||||
#define ARES_COPYRIGHT "2004 - 2016 Daniel Stenberg, <daniel@haxx.se>."
|
||||
|
||||
#define ARES_VERSION_MAJOR 1
|
||||
-#define ARES_VERSION_MINOR 12
|
||||
-#define ARES_VERSION_PATCH 1
|
||||
+#define ARES_VERSION_MINOR 13
|
||||
+#define ARES_VERSION_PATCH 0
|
||||
#define ARES_VERSION ((ARES_VERSION_MAJOR<<16)|\
|
||||
(ARES_VERSION_MINOR<<8)|\
|
||||
(ARES_VERSION_PATCH))
|
||||
-#define ARES_VERSION_STR "1.12.1-DEV"
|
||||
+#define ARES_VERSION_STR "1.13.0"
|
||||
|
||||
#if (ARES_VERSION >= 0x010700)
|
||||
# define CARES_HAVE_ARES_LIBRARY_INIT 1
|
19
pkgs/development/libraries/grpc/default.nix
Normal file
19
pkgs/development/libraries/grpc/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ stdenv, fetchurl, cmake, zlib, c-ares, pkgconfig, openssl, protobuf, gflags }:
|
||||
|
||||
stdenv.mkDerivation rec
|
||||
{ name = "grpc-1.8.3";
|
||||
src = fetchurl
|
||||
{ url = "https://github.com/grpc/grpc/archive/v1.8.3.tar.gz";
|
||||
sha256 = "14ichjllvhkbv8sjh9j5njnagpqw2sl12n41ga90jnj7qvfwwjy1";
|
||||
};
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
buildInputs = [ zlib c-ares c-ares.cmake-config openssl protobuf gflags ];
|
||||
cmakeFlags =
|
||||
[ "-DgRPC_ZLIB_PROVIDER=package"
|
||||
"-DgRPC_CARES_PROVIDER=package"
|
||||
"-DgRPC_SSL_PROVIDER=package"
|
||||
"-DgRPC_PROTOBUF_PROVIDER=package"
|
||||
"-DgRPC_GFLAGS_PROVIDER=package"
|
||||
];
|
||||
enableParallelBuilds = true;
|
||||
}
|
@ -8664,6 +8664,8 @@ with pkgs;
|
||||
|
||||
grib-api = callPackage ../development/libraries/grib-api { };
|
||||
|
||||
grpc = callPackage ../development/libraries/grpc { };
|
||||
|
||||
gst_all_1 = recurseIntoAttrs(callPackage ../development/libraries/gstreamer {
|
||||
callPackage = pkgs.newScope (pkgs // { libav = pkgs.ffmpeg; });
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user