mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 13:10:33 +00:00
36 lines
831 B
Nix
36 lines
831 B
Nix
{ 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
|
|
cp -v -r ../src $out
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "Google test: Google's framework for writing C++ tests.";
|
|
homepage = https://code.google.com/p/googletest/;
|
|
license = licenses.bsd3;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ zoomulator ];
|
|
};
|
|
}
|
|
|