diff --git a/pkgs/development/libraries/gmock/default.nix b/pkgs/development/libraries/gmock/default.nix index 71ac281195b6..926832dbada6 100644 --- a/pkgs/development/libraries/gmock/default.nix +++ b/pkgs/development/libraries/gmock/default.nix @@ -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; }; } diff --git a/pkgs/development/libraries/protobuf/3.0.nix b/pkgs/development/libraries/protobuf/3.0.nix index 900c9dc5a512..a06d4cef968a 100644 --- a/pkgs/development/libraries/protobuf/3.0.nix +++ b/pkgs/development/libraries/protobuf/3.0.nix @@ -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; +} diff --git a/pkgs/development/libraries/protobuf/generic.nix b/pkgs/development/libraries/protobuf/generic.nix index fc41187a931e..51136c31aa13 100644 --- a/pkgs/development/libraries/protobuf/generic.nix +++ b/pkgs/development/libraries/protobuf/generic.nix @@ -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;