2013-11-11 16:51:23 +01:00
|
|
|
{ stdenv, fetchurl, unzip, cmake}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.7.0";
|
|
|
|
name = "gtest-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://googletest.googlecode.com/files/${name}.zip";
|
|
|
|
sha256="03fnw3bizw9bcx7l5qy1vz7185g33d5pxqcb6aqxwlrzv26s2z14";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ unzip cmake ];
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ../ -DCMAKE_INSTALL_PREFIX=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
cp -v libgtest.a libgtest_main.a $out/lib
|
|
|
|
cp -v -r ../include $out
|
2014-07-27 12:17:10 +02:00
|
|
|
cp -v -r ../src $out
|
2013-11-11 16:51:23 +01:00
|
|
|
'';
|
|
|
|
|
2014-09-18 09:48:31 +02:00
|
|
|
meta = with stdenv.lib; {
|
2014-11-11 14:20:43 +01:00
|
|
|
description = "Google's framework for writing C++ tests";
|
2013-11-11 16:51:23 +01:00
|
|
|
homepage = https://code.google.com/p/googletest/;
|
2014-09-18 09:48:31 +02:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ zoomulator ];
|
2013-11-11 16:51:23 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|