Added gmock (Google Mock) package to complement gtest package.
This commit is contained in:
parent
f3739e2aca
commit
669443f5c1
38
pkgs/development/libraries/gmock/default.nix
Normal file
38
pkgs/development/libraries/gmock/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ stdenv, fetchurl, unzip, cmake}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.7.0";
|
||||
name = "gmock-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://googlemock.googlecode.com/files/${name}.zip";
|
||||
sha256="26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b";
|
||||
};
|
||||
|
||||
buildInputs = [ unzip cmake ];
|
||||
|
||||
configurePhase = ''
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../ -DCMAKE_INSTALL_PREFIX=$out
|
||||
'';
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1229,6 +1229,7 @@ let
|
||||
gt5 = callPackage ../tools/system/gt5 { };
|
||||
|
||||
gtest = callPackage ../development/libraries/gtest {};
|
||||
gmock = callPackage ../development/libraries/gmock {};
|
||||
|
||||
gtkdatabox = callPackage ../development/libraries/gtkdatabox {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user