summary refs log tree commit diff
path: root/pkgs/development/libraries/catch/default.nix
blob: 090d03a1d14d4d1370c6f1b74f979e8cc3b1d40b (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
35
36
37
{ stdenv, lib, cmake, fetchFromGitHub }:

stdenv.mkDerivation rec {

  name = "catch-${version}";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "philsquared";
    repo = "Catch";
    rev = "v" + version;
    sha256 = "1ag8siafg7fmb50qdqznryrg3lvv56f09nvqwqqn2rlk83zjnaw0";
  };

  buildInputs = [ cmake ];
  dontUseCmakeConfigure = true;

  buildPhase = ''
    cmake -Hprojects/CMake -BBuild -DCMAKE_BUILD_TYPE=Release -DUSE_CPP11=ON
    cd Build
    make
    cd ..
  '';

  installPhase = ''
    mkdir -p $out
    mv include $out/.
  '';

  meta = with stdenv.lib; {
    description = "A multi-paradigm automated test framework for C++ and Objective-C (and, maybe, C)";
    homepage = "http://catch-lib.net";
    license = licenses.boost;
    maintainers = with maintainers; [ edwtjo ];
    platforms = with platforms; unix;
  };
}