summary refs log tree commit diff
path: root/pkgs/development/libraries/gtest/default.nix
blob: e516e4a475a3e7a594fef9b96e327d556e8fa038 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, cmake, callPackage }:
let
  source = callPackage ./source.nix { };
in
stdenv.mkDerivation rec {
  name = "gtest-${source.version}";

  src = source;

  buildInputs = [ 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's framework for writing C++ tests";
    homepage = https://code.google.com/p/googletest/;
    license = licenses.bsd3;
    platforms = platforms.all;
    maintainers = with maintainers; [ zoomulator ];
  };

  passthru = { inherit source; };
}