git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #143693 from cpcloud/bump-google-cloud-cpp
commitd2b31aa88f44b21c5f4cce383905017de4c9679f authorMaciej Krüger <mkg20001@gmail.com> dateThu 4 Nov 2021, 11:48 (5 years ago) parente1fd2d833c991c
1 file changed+44−44
pkgs/development/libraries/google-cloud-cpp/default.nix+44−44
pkgs/development/libraries/google-cloud-cpp/default.nix+44−44
@@ -1,76 +1,76 @@
11{ lib
22, stdenv
3−, clang-tools
4−, grpc
5−, curl
3+, fetchFromGitHub
4+, abseil-cpp
5+, c-ares
66, cmake
7+, crc32c
8+, curl
9+, grpc
10+, gbenchmark
11+, gtest
12+, ninja
13+, nlohmann_json
714, pkg-config
8−, fetchFromGitHub
9−, doxygen
1015, protobuf
11−, crc32c
12−, fetchurl
13−, openssl
14−, libnsl
16+ # default list of APIs: https://github.com/googleapis/google-cloud-cpp/blob/v1.32.1/CMakeLists.txt#L173
17+, apis ? [ "*" ]
1518}:
1619let
20+ googleapisRev = "ed739492993c4a99629b6430affdd6c0fb59d435";
1721 googleapis = fetchFromGitHub {
1822 owner = "googleapis";
1923 repo = "googleapis";
20− rev = "9c9f778aedde02f9826d2ae5d0f9c96409ba0f25";
21− sha256 = "1gd3nwv8qf503wy6km0ad6akdvss9w5b1k3jqizy5gah1fkirkpi";
22− };
23− googleapis-cpp-cmakefiles = stdenv.mkDerivation rec {
24− pname = "googleapis-cpp-cmakefiles";
25− version = "0.1.5";
26− src = fetchFromGitHub {
27− owner = "googleapis";
28− repo = "cpp-cmakefiles";
29− rev = "v${version}";
30− sha256 = "02zkcq2wl831ayd9qy009xvfx7q80pgycx7mzz9vknwd0nn6dd0n";
31− };
32−
33− nativeBuildInputs = [ cmake pkg-config ];
34− buildInputs = [ grpc openssl protobuf ];
35−
36− postPatch = ''
37− sed -e 's,https://github.com/googleapis/googleapis/archive/9c9f778aedde02f9826d2ae5d0f9c96409ba0f25.tar.gz,file://${googleapis},' \
38− -i CMakeLists.txt
39− '';
40− };
41− _nlohmann_json = fetchurl {
42− url = "https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp";
43− sha256 = "0pw3jpi572irbp2dqclmyhgic6k9rxav5mpp9ygbp9xj48gnvnk3";
24+ rev = googleapisRev;
25+ hash = "sha256:1xrnh77vb8hxmf1ywqsifzd39kylhbdyah0b0b9bm7nw0mnahssl";
4426 };
45−in stdenv.mkDerivation rec {
27+in
28+stdenv.mkDerivation rec {
4629 pname = "google-cloud-cpp";
47− version = "0.14.0";
30+ version = "1.32.1";
4831
4932 src = fetchFromGitHub {
5033 owner = "googleapis";
5134 repo = "google-cloud-cpp";
5235 rev = "v${version}";
53− sha256 = "15wci4m8h6py7fqfziq8mp5m6pxp2h1cbh5rp2k90mk5js4jb9pa";
36+ sha256 = "0g720sni70nlncv4spm4rlfykdkpjnv81axfz2jd1arpdajm0mg9";
5437 };
5538
56− buildInputs = [ curl crc32c googleapis-cpp-cmakefiles grpc protobuf libnsl ];
57− nativeBuildInputs = [ clang-tools cmake pkg-config doxygen ];
58−
59− outputs = [ "out" "dev" ];
60−
6139 postPatch = ''
62− sed -e 's,https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp,file://${_nlohmann_json},' \
63− -i cmake/DownloadNlohmannJson.cmake
40+ substituteInPlace external/googleapis/CMakeLists.txt \
41+ --replace "https://github.com/googleapis/googleapis/archive/${googleapisRev}.tar.gz" "file://${googleapis}"
6442 '';
6543
44+ nativeBuildInputs = [
45+ cmake
46+ ninja
47+ pkg-config
48+ ];
49+
50+ buildInputs = [
51+ abseil-cpp
52+ c-ares
53+ crc32c
54+ curl
55+ grpc
56+ gbenchmark
57+ gtest
58+ nlohmann_json
59+ protobuf
60+ ];
61+
6662 cmakeFlags = [
6763 "-DBUILD_SHARED_LIBS:BOOL=ON"
64+ "-DBUILD_TESTING:BOOL=ON"
65+ "-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES:BOOL=OFF"
66+ ] ++ lib.optionals (apis != [ "*" ]) [
67+ "-DGOOGLE_CLOUD_CPP_ENABLE=${lib.concatStringsSep ";" apis}"
6868 ];
6969
7070 meta = with lib; {
7171 license = with licenses; [ asl20 ];
7272 homepage = "https://github.com/googleapis/google-cloud-cpp";
7373 description = "C++ Idiomatic Clients for Google Cloud Platform services";
74− maintainers = with maintainers; [ ];
74+ maintainers = with maintainers; [ cpcloud ];
7575 };
7676}