2016-01-18 17:45:03 +00:00
|
|
|
{ stdenv, cmake, fetchzip }:
|
|
|
|
|
2014-08-08 17:16:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2016-01-18 17:45:03 +00:00
|
|
|
name = "gmock-${version}";
|
|
|
|
version = "1.7.0";
|
2014-08-08 17:16:03 +00:00
|
|
|
|
2016-01-18 17:45:03 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://googlemock.googlecode.com/files/gmock-${version}.zip";
|
|
|
|
sha256 = "04n9p6pf3mrqsabrsncv32d3fqvd86zmcdq3gyni7liszgfk0paz";
|
|
|
|
};
|
2014-08-08 17:16:03 +00:00
|
|
|
|
2016-01-15 01:24:54 +00:00
|
|
|
buildInputs = [ cmake ];
|
2014-08-08 17:16:03 +00:00
|
|
|
|
|
|
|
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 = {
|
2014-09-01 21:53:42 +00:00
|
|
|
description = "Google mock: Google's framework for writing C++ mock classes";
|
2014-08-08 17:16:03 +00:00
|
|
|
homepage = https://code.google.com/p/googlemock/;
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.auntie ];
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2014-08-08 17:16:03 +00:00
|
|
|
};
|
2016-01-15 01:24:54 +00:00
|
|
|
|
2016-01-18 17:45:03 +00:00
|
|
|
passthru = { source = src; };
|
2014-08-08 17:16:03 +00:00
|
|
|
}
|