summary refs log tree commit diff
path: root/pkgs/development/libraries/catch/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/catch/default.nix')
-rw-r--r--pkgs/development/libraries/catch/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/libraries/catch/default.nix b/pkgs/development/libraries/catch/default.nix
new file mode 100644
index 00000000000..625ec2995e3
--- /dev/null
+++ b/pkgs/development/libraries/catch/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, cmake, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+
+  name = "catch-${version}";
+  version = "1.2.1";
+
+  src = fetchFromGitHub {
+    owner = "philsquared";
+    repo = "Catch";
+    rev = "v" + version;
+    sha256 = "0rz2nmvvh66x6w2nb7l08vc5x9aqg1qfz2qfiykaz1ybc19fwck2";
+  };
+
+  buildInputs = [ cmake ];
+  dontUseCmakeConfigure = true;
+
+  buildPhase = ''
+    cmake -Hprojects/CMake -BBuild -DCMAKE_BUILD_TYPE=Release
+    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 ];
+  };
+}