protobuf: 3.0.0-alpha-3.1 -> 3.0.0-beta-2

Also split out gmock's source so that it can be copied into protobuf's
source. Hopefull this hack can be removed again once gmock is replaced
by gtest.

This does not include python bindings.

+64 -15
+9 -9
pkgs/development/libraries/gmock/default.nix
··· 1 - { stdenv, fetchurl, unzip, cmake}: 2 - 1 + { stdenv, cmake, callPackage }: 2 + let 3 + source = callPackage ./source.nix { }; 4 + in 3 5 stdenv.mkDerivation rec { 4 - version = "1.7.0"; 5 - name = "gmock-${version}"; 6 + name = "gmock-${source.version}"; 6 7 7 - src = fetchurl { 8 - url = "https://googlemock.googlecode.com/files/${name}.zip"; 9 - sha256="26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b"; 10 - }; 8 + src = source; 11 9 12 - buildInputs = [ unzip cmake ]; 10 + buildInputs = [ cmake ]; 13 11 14 12 buildPhase = '' 15 13 # avoid building gtest ··· 29 27 license = stdenv.lib.licenses.bsd3; 30 28 maintainers = [ stdenv.lib.maintainers.auntie ]; 31 29 }; 30 + 31 + passthru = { inherit source; }; 32 32 }
+20
pkgs/development/libraries/gmock/source.nix
··· 1 + { fetchzip, stdenv, unzip, ... }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "gmock-src-${version}"; 5 + version = "1.7.0"; 6 + 7 + src = fetchzip { 8 + url = "https://googlemock.googlecode.com/files/gmock-${version}.zip"; 9 + sha256="04n9p6pf3mrqsabrsncv32d3fqvd86zmcdq3gyni7liszgfk0paz"; 10 + }; 11 + 12 + buildInputs = [ unzip ]; 13 + 14 + installPhase = '' 15 + mkdir $out 16 + cp -r * $out 17 + ''; 18 + 19 + passthru = { inherit version; }; 20 + }
+34 -5
pkgs/development/libraries/protobuf/3.0.nix
··· 1 - { callPackage, fetchFromGitHub, ... } @ args: 1 + { stdenv, fetchFromGitHub , autoreconfHook, zlib, gmock }: 2 2 3 - callPackage ./generic.nix (args // rec { 4 - version = "3.0.0-alpha-3.1"; 3 + stdenv.mkDerivation rec { 4 + name = "protobuf-${version}"; 5 + 6 + version = "3.0.0-beta-2"; 5 7 # make sure you test also -A pythonPackages.protobuf 6 8 src = fetchFromGitHub { 7 9 owner = "google"; 8 10 repo = "protobuf"; 9 11 rev = "v${version}"; 10 - sha256 = "0vzw20ymjmjrrmg84f822qslclsb2q0wf0qdj2da198gmkkbrw45"; 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 + doCheck = true; 27 + 28 + meta = { 29 + description = "Google's data interchange format"; 30 + longDescription = 31 + ''Protocol Buffers are a way of encoding structured data in an efficient 32 + yet extensible format. Google uses Protocol Buffers for almost all of 33 + its internal RPC protocols and file formats. 34 + ''; 35 + license = stdenv.lib.licenses.bsd3; 36 + platforms = stdenv.lib.platforms.unix; 37 + homepage = https://developers.google.com/protocol-buffers/; 11 38 }; 12 - }) 39 + 40 + passthru.version = version; 41 + }
+1 -1
pkgs/development/libraries/protobuf/generic.nix
··· 32 32 33 33 license = "mBSD"; 34 34 35 - homepage = http://code.google.com/p/protobuf/; 35 + homepage = https://developers.google.com/protocol-buffers/; 36 36 }; 37 37 38 38 passthru.version = version;