2019-10-05 19:25:59 +01:00
|
|
|
{ stdenv, clang-tools, grpc, curl, cmake, pkgconfig, fetchFromGitHub, doxygen, protobuf, crc32c, c-ares, fetchurl, openssl, zlib }:
|
2019-07-31 20:51:48 +01:00
|
|
|
let
|
2019-10-05 19:25:59 +01:00
|
|
|
googleapis = fetchFromGitHub {
|
|
|
|
owner = "googleapis";
|
|
|
|
repo = "googleapis";
|
|
|
|
rev = "9c9f778aedde02f9826d2ae5d0f9c96409ba0f25";
|
|
|
|
sha256 = "1gd3nwv8qf503wy6km0ad6akdvss9w5b1k3jqizy5gah1fkirkpi";
|
|
|
|
};
|
|
|
|
googleapis-cpp-cmakefiles = stdenv.mkDerivation rec {
|
|
|
|
pname = "googleapis-cpp-cmakefiles";
|
|
|
|
version = "0.1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "googleapis";
|
|
|
|
repo = "cpp-cmakefiles";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "02zkcq2wl831ayd9qy009xvfx7q80pgycx7mzz9vknwd0nn6dd0n";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
buildInputs = [ c-ares c-ares.cmake-config grpc openssl protobuf zlib ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -e 's,https://github.com/googleapis/googleapis/archive/9c9f778aedde02f9826d2ae5d0f9c96409ba0f25.tar.gz,file://${googleapis},' \
|
|
|
|
-i CMakeLists.txt
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
_nlohmann_json = fetchurl {
|
|
|
|
url = "https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp";
|
|
|
|
sha256 = "0pw3jpi572irbp2dqclmyhgic6k9rxav5mpp9ygbp9xj48gnvnk3";
|
2019-07-31 20:51:48 +01:00
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "google-cloud-cpp";
|
2019-10-05 19:25:59 +01:00
|
|
|
version = "0.14.0";
|
2019-07-31 20:51:48 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "googleapis";
|
|
|
|
repo = "google-cloud-cpp";
|
|
|
|
rev = "v${version}";
|
2019-10-05 19:25:59 +01:00
|
|
|
sha256 = "15wci4m8h6py7fqfziq8mp5m6pxp2h1cbh5rp2k90mk5js4jb9pa";
|
2019-07-31 20:51:48 +01:00
|
|
|
};
|
|
|
|
|
2019-10-05 19:25:59 +01:00
|
|
|
buildInputs = [ curl crc32c c-ares c-ares.cmake-config googleapis-cpp-cmakefiles grpc protobuf ];
|
|
|
|
nativeBuildInputs = [ clang-tools cmake pkgconfig doxygen ];
|
2019-07-31 20:51:48 +01:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2019-10-05 19:25:59 +01:00
|
|
|
sed -e 's,https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp,file://${_nlohmann_json},' \
|
|
|
|
-i cmake/DownloadNlohmannJson.cmake
|
2019-07-31 20:51:48 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS:BOOL=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
license = with licenses; [ asl20 ];
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/googleapis/google-cloud-cpp";
|
2019-07-31 20:51:48 +01:00
|
|
|
description = "C++ Idiomatic Clients for Google Cloud Platform services";
|
2020-11-11 19:40:41 +00:00
|
|
|
maintainers = with maintainers; [ andir ];
|
2020-11-09 18:33:02 +00:00
|
|
|
broken = true; # Broken on Hydra since 2020-05-19
|
2019-07-31 20:51:48 +01:00
|
|
|
};
|
|
|
|
}
|