2014-11-19 10:33:20 -08:00
|
|
|
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, zlib, gtest }:
|
2010-10-30 14:44:22 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-11-19 10:33:20 -08:00
|
|
|
name = "protobuf-${version}";
|
|
|
|
version = "2.6.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "protobuf";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "03df8zvx2sry3jz2x4pi3l32qyfqa7w8kj8jdbz30nzy0h7aa070";
|
2010-10-30 14:44:22 -07:00
|
|
|
};
|
|
|
|
|
2014-11-19 10:33:20 -08:00
|
|
|
postPatch = ''
|
|
|
|
sed -i -e '/gtest/d' Makefile.am
|
|
|
|
sed -i \
|
|
|
|
-e 's!\$(top_\(build\|src\)dir)/gtest!${gtest}!g' \
|
|
|
|
-e 's/\(libgtest[^.]*\.\)la/\1a/g' \
|
|
|
|
src/Makefile.am
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ zlib autoconf automake libtool gtest ];
|
|
|
|
|
|
|
|
preConfigure = "autoreconf -vfi";
|
2010-10-30 14:44:22 -07:00
|
|
|
|
2014-09-18 04:12:01 -07:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
2010-10-30 14:44:22 -07:00
|
|
|
description = "Protocol Buffers - Google's data interchange format";
|
2014-09-18 04:12:01 -07:00
|
|
|
|
2014-11-19 10:33:20 -08:00
|
|
|
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.
|
|
|
|
'';
|
2014-09-18 04:12:01 -07:00
|
|
|
|
2014-11-19 10:33:20 -08:00
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2014-09-18 04:12:01 -07:00
|
|
|
|
2014-11-19 10:33:20 -08:00
|
|
|
homepage = "https://developers.google.com/protocol-buffers/";
|
2010-10-30 14:44:22 -07:00
|
|
|
};
|
|
|
|
}
|