···1+{ stdenv, fetchFromGitHub , autoreconfHook, zlib, gmock }:
2+3+stdenv.mkDerivation rec {
4+ name = "protobuf-${version}";
5+6+ version = "3.0.0-beta-2";
7+ # make sure you test also -A pythonPackages.protobuf
8+ src = fetchFromGitHub {
9+ owner = "google";
10+ repo = "protobuf";
11+ rev = "v${version}";
12+ sha256 = "0cbr1glgma5vakabsjwcs41pcnn8yphhn037l0zd121zb9gdaqc1";
13+ };
14+15+ postPatch = ''
16+ rm -rf gmock
17+ cp -r ${gmock.source} gmock
18+ chmod -R a+w gmock
19+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
20+ substituteInPlace src/google/protobuf/testing/googletest.cc \
21+ --replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
22+ '';
23+24+ buildInputs = [ autoreconfHook zlib ];
25+26+ enableParallelBuilding = true;
27+28+ doCheck = true;
29+30+ meta = {
31+ description = "Google's data interchange format";
32+ longDescription =
33+ ''Protocol Buffers are a way of encoding structured data in an efficient
34+ yet extensible format. Google uses Protocol Buffers for almost all of
35+ its internal RPC protocols and file formats.
36+ '';
37+ license = stdenv.lib.licenses.bsd3;
38+ platforms = stdenv.lib.platforms.unix;
39+ homepage = https://developers.google.com/protocol-buffers/;
40+ };
41+42+ passthru.version = version;
43+}
-3
pkgs/development/libraries/protobuf/generic.nix
···2526 meta = {
27 description = "Protocol Buffers - Google's data interchange format";
28-29 longDescription =
30 '' Protocol Buffers are a way of encoding structured data in an
31 efficient yet extensible format. Google uses Protocol Buffers for
32 almost all of its internal RPC protocols and file formats.
33 '';
34-35 license = "mBSD";
36-37 homepage = https://developers.google.com/protocol-buffers/;
38 platforms = stdenv.lib.platforms.unix;
39 };
···2526 meta = {
27 description = "Protocol Buffers - Google's data interchange format";
028 longDescription =
29 '' Protocol Buffers are a way of encoding structured data in an
30 efficient yet extensible format. Google uses Protocol Buffers for
31 almost all of its internal RPC protocols and file formats.
32 '';
033 license = "mBSD";
034 homepage = https://developers.google.com/protocol-buffers/;
35 platforms = stdenv.lib.platforms.unix;
36 };