2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, cmake, ninja, fetchFromGitHub, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gtest";
|
|
|
|
version = "1.10.0";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "googletest";
|
|
|
|
rev = "release-${version}";
|
|
|
|
sha256 = "1zbmab9295scgg4z2vclgfgjchfjailjnvzc6f5x9jvlsdi3dpwz";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./fix-cmake-config-includedir.patch
|
2020-10-19 00:13:06 +00:00
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-pkgconfig-paths.patch";
|
|
|
|
url = "https://github.com/google/googletest/commit/5126ff48d9ac54828d1947d1423a5ef2a8efee3b.patch";
|
|
|
|
sha256 = "sha256-TBvECU/9nuvwjsCjWJP2b6DNy+FYnHIFZeuVW7g++JE=";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ninja ];
|
|
|
|
|
|
|
|
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Google's framework for writing C++ tests";
|
|
|
|
homepage = "https://github.com/google/googletest";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ zoomulator ivan-tkatchev ];
|
|
|
|
};
|
|
|
|
}
|