1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00

Merge #11535: protobuf: 3.0.0-alpha-3.1 -> 3.0.0-beta-2

This commit is contained in:
Vladimír Čunát 2016-01-19 08:25:44 +01:00
commit 315745094c
3 changed files with 45 additions and 12 deletions

View file

@ -1,15 +1,15 @@
{ stdenv, fetchurl, unzip, cmake}:
{ stdenv, cmake, fetchzip }:
stdenv.mkDerivation rec {
version = "1.7.0";
name = "gmock-${version}";
version = "1.7.0";
src = fetchurl {
url = "https://googlemock.googlecode.com/files/${name}.zip";
sha256="26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b";
src = fetchzip {
url = "https://googlemock.googlecode.com/files/gmock-${version}.zip";
sha256 = "04n9p6pf3mrqsabrsncv32d3fqvd86zmcdq3gyni7liszgfk0paz";
};
buildInputs = [ unzip cmake ];
buildInputs = [ cmake ];
buildPhase = ''
# avoid building gtest
@ -29,4 +29,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.auntie ];
};
passthru = { source = src; };
}

View file

@ -1,12 +1,43 @@
{ callPackage, fetchFromGitHub, ... } @ args:
{ stdenv, fetchFromGitHub , autoreconfHook, zlib, gmock }:
callPackage ./generic.nix (args // rec {
version = "3.0.0-alpha-3.1";
stdenv.mkDerivation rec {
name = "protobuf-${version}";
version = "3.0.0-beta-2";
# make sure you test also -A pythonPackages.protobuf
src = fetchFromGitHub {
owner = "google";
repo = "protobuf";
rev = "v${version}";
sha256 = "0vzw20ymjmjrrmg84f822qslclsb2q0wf0qdj2da198gmkkbrw45";
sha256 = "0cbr1glgma5vakabsjwcs41pcnn8yphhn037l0zd121zb9gdaqc1";
};
})
postPatch = ''
rm -rf gmock
cp -r ${gmock.source} gmock
chmod -R a+w gmock
'' + stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace src/google/protobuf/testing/googletest.cc \
--replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
'';
buildInputs = [ autoreconfHook zlib ];
enableParallelBuilding = true;
doCheck = true;
meta = {
description = "Google's data interchange format";
longDescription =
''Protocol Buffers are a way of encoding structured data in an efficient
yet extensible format. Google uses Protocol Buffers for almost all of
its internal RPC protocols and file formats.
'';
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.unix;
homepage = https://developers.google.com/protocol-buffers/;
};
passthru.version = version;
}

View file

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
license = "mBSD";
homepage = http://code.google.com/p/protobuf/;
homepage = https://developers.google.com/protocol-buffers/;
};
passthru.version = version;