1{ stdenv, lib, cmake, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4
5 name = "catch-${version}";
6 version = "1.2.1";
7
8 src = fetchFromGitHub {
9 owner = "philsquared";
10 repo = "Catch";
11 rev = "v" + version;
12 sha256 = "0rz2nmvvh66x6w2nb7l08vc5x9aqg1qfz2qfiykaz1ybc19fwck2";
13 };
14
15 buildInputs = [ cmake ];
16 dontUseCmakeConfigure = true;
17
18 buildPhase = ''
19 cmake -Hprojects/CMake -BBuild -DCMAKE_BUILD_TYPE=Release
20 cd Build
21 make
22 cd ..
23 '';
24
25 installPhase = ''
26 mkdir -p $out
27 mv include $out/.
28 '';
29
30 meta = with stdenv.lib; {
31 description = "A multi-paradigm automated test framework for C++ and Objective-C (and, maybe, C)";
32 homepage = "http://catch-lib.net";
33 license = licenses.boost;
34 maintainers = with maintainers; [ edwtjo ];
35 };
36}