···11+{ stdenv, fetchFromGitHub , autoreconfHook, zlib, gmock }:
22+33+stdenv.mkDerivation rec {
44+ name = "protobuf-${version}";
55+66+ version = "3.0.0-beta-2";
77+ # make sure you test also -A pythonPackages.protobuf
88+ src = fetchFromGitHub {
99+ owner = "google";
1010+ repo = "protobuf";
1111+ rev = "v${version}";
1212+ sha256 = "0cbr1glgma5vakabsjwcs41pcnn8yphhn037l0zd121zb9gdaqc1";
1313+ };
1414+1515+ postPatch = ''
1616+ rm -rf gmock
1717+ cp -r ${gmock.source} gmock
1818+ chmod -R a+w gmock
1919+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
2020+ substituteInPlace src/google/protobuf/testing/googletest.cc \
2121+ --replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
2222+ '';
2323+2424+ buildInputs = [ autoreconfHook zlib ];
2525+2626+ enableParallelBuilding = true;
2727+2828+ doCheck = true;
2929+3030+ meta = {
3131+ description = "Google's data interchange format";
3232+ longDescription =
3333+ ''Protocol Buffers are a way of encoding structured data in an efficient
3434+ yet extensible format. Google uses Protocol Buffers for almost all of
3535+ its internal RPC protocols and file formats.
3636+ '';
3737+ license = stdenv.lib.licenses.bsd3;
3838+ platforms = stdenv.lib.platforms.unix;
3939+ homepage = https://developers.google.com/protocol-buffers/;
4040+ };
4141+4242+ passthru.version = version;
4343+}
-3
pkgs/development/libraries/protobuf/generic.nix
···25252626 meta = {
2727 description = "Protocol Buffers - Google's data interchange format";
2828-2928 longDescription =
3029 '' Protocol Buffers are a way of encoding structured data in an
3130 efficient yet extensible format. Google uses Protocol Buffers for
3231 almost all of its internal RPC protocols and file formats.
3332 '';
3434-3533 license = "mBSD";
3636-3734 homepage = https://developers.google.com/protocol-buffers/;
3835 platforms = stdenv.lib.platforms.unix;
3936 };
+2
pkgs/top-level/all-packages.nix
···9081908190829082 protobuf = protobuf2_6;
90839083 protobuf3_0 = lowPrio (callPackage ../development/libraries/protobuf/3.0.nix { });
90849084+ # 3.0.0-beta-2 is only introduced for tensorflow. remove this version when tensorflow is moved to 3.0.
90859085+ protobuf3_0_0b2 = lowPrio (callPackage ../development/libraries/protobuf/3.0.0-beta-2.nix { });
90849086 protobuf2_6 = callPackage ../development/libraries/protobuf/2.6.nix { };
90859087 protobuf2_5 = callPackage ../development/libraries/protobuf/2.5.nix { };
90869088