gtest, gmock: fix broken package by updating to 1.8.0.
This commit is contained in:
parent
3dbf6b4a09
commit
9c2a222092
@ -1,35 +0,0 @@
|
||||
{ stdenv, cmake, fetchzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gmock-${version}";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://googlemock.googlecode.com/files/gmock-${version}.zip";
|
||||
sha256 = "04n9p6pf3mrqsabrsncv32d3fqvd86zmcdq3gyni7liszgfk0paz";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake ];
|
||||
|
||||
buildPhase = ''
|
||||
# avoid building gtest
|
||||
make gmock gmock_main
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp -v libgmock.a libgmock_main.a $out/lib
|
||||
cp -v -r ../include $out
|
||||
cp -v -r ../src $out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Google mock: Google's framework for writing C++ mock classes";
|
||||
homepage = https://code.google.com/p/googlemock/;
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = [ stdenv.lib.maintainers.auntie ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
|
||||
passthru = { source = src; };
|
||||
}
|
@ -1,11 +1,14 @@
|
||||
{ stdenv, cmake, callPackage }:
|
||||
let
|
||||
source = callPackage ./source.nix { };
|
||||
in
|
||||
{ stdenv, cmake, fetchFromGitHub }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gtest-${source.version}";
|
||||
name = "gtest-${version}";
|
||||
version = "1.8.0";
|
||||
|
||||
src = source;
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "googletest";
|
||||
rev = "release-${version}";
|
||||
sha256 = "0bjlljmbf8glnd9qjabx73w6pd7ibv43yiyngqvmvgxsabzr8399";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake ];
|
||||
|
||||
@ -17,9 +20,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp -v libgtest.a libgtest_main.a $out/lib
|
||||
cp -v -r ../include $out
|
||||
cp -v -r ../src $out
|
||||
cp -v googlemock/gtest/libgtest.a googlemock/gtest/libgtest_main.a googlemock/libgmock.a googlemock/libgmock_main.a $out/lib
|
||||
ln -s $out/lib/libgmock.a $out/lib/libgoogletest.a
|
||||
mkdir -p $out/include
|
||||
cp -v -r ../googlemock/include/gmock $out/include
|
||||
cp -v -r ../googletest/include/gtest $out/include
|
||||
mkdir -p $out/src
|
||||
cp -v -r ../googlemock/src/* ../googletest/src/* $out/src
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
@ -27,8 +34,6 @@ stdenv.mkDerivation rec {
|
||||
homepage = https://code.google.com/p/googletest/;
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ zoomulator ];
|
||||
maintainers = with maintainers; [ zoomulator ivan-tkatchev ];
|
||||
};
|
||||
|
||||
passthru = { inherit source; };
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
{ fetchurl, stdenv, unzip, ... }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gtest-src-${version}";
|
||||
version = "1.7.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://googletest.googlecode.com/files/gtest-${version}.zip";
|
||||
sha256 = "03fnw3bizw9bcx7l5qy1vz7185g33d5pxqcb6aqxwlrzv26s2z14";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
|
||||
buildCommand = ''
|
||||
unpackPhase
|
||||
cd gtest-${version}
|
||||
mkdir $out
|
||||
cp -r * $out
|
||||
'';
|
||||
|
||||
passthru = { inherit version; };
|
||||
}
|
@ -18,8 +18,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
rm -rf gmock
|
||||
cp -r ${gmock.source} gmock
|
||||
cp -r ${gmock.src}/googlemock gmock
|
||||
cp -r ${gmock.src}/googletest googletest
|
||||
chmod -R a+w gmock
|
||||
chmod -R a+w googletest
|
||||
ln -s ../googletest gmock/gtest
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace src/google/protobuf/testing/googletest.cc \
|
||||
--replace 'tmpnam(b)' '"'$TMPDIR'/foo"'
|
||||
|
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
rm -rf gtest
|
||||
cp -r ${gtest.source} gtest
|
||||
cp -r ${gtest.src}/googletest gtest
|
||||
chmod -R a+w gtest
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace src/google/protobuf/testing/googletest.cc \
|
||||
|
@ -2055,7 +2055,7 @@ in
|
||||
gt5 = callPackage ../tools/system/gt5 { };
|
||||
|
||||
gtest = callPackage ../development/libraries/gtest {};
|
||||
gmock = callPackage ../development/libraries/gmock {};
|
||||
gmock = gtest;
|
||||
gbenchmark = callPackage ../development/libraries/gbenchmark {};
|
||||
|
||||
gtkdatabox = callPackage ../development/libraries/gtkdatabox {};
|
||||
|
Loading…
Reference in New Issue
Block a user