nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 19.03 32 lines 796 B view raw
1{ stdenv, cmake, ninja, fetchFromGitHub 2, static ? false }: 3 4stdenv.mkDerivation rec { 5 name = "gtest-${version}"; 6 version = "1.8.1"; 7 8 outputs = [ "out" "dev" ]; 9 10 src = fetchFromGitHub { 11 owner = "google"; 12 repo = "googletest"; 13 rev = "release-${version}"; 14 sha256 = "0270msj6n7mggh4xqqjp54kswbl7mkcc8px1p5dqdpmw5ngh9fzk"; 15 }; 16 17 patches = [ 18 ./fix-cmake-config-includedir.patch 19 ]; 20 21 nativeBuildInputs = [ cmake ninja ]; 22 23 cmakeFlags = stdenv.lib.optional (!static) "-DBUILD_SHARED_LIBS=ON"; 24 25 meta = with stdenv.lib; { 26 description = "Google's framework for writing C++ tests"; 27 homepage = https://github.com/google/googletest; 28 license = licenses.bsd3; 29 platforms = platforms.all; 30 maintainers = with maintainers; [ zoomulator ivan-tkatchev ]; 31 }; 32}