aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/libraries/cxxtest/default.nix
blob: e1898044efaf7a3d37065d0b82b10d1dd1f95012 (plain)
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
{ stdenv, buildPythonApplication, fetchFromGitHub }:

buildPythonApplication rec {
  pname = "cxxtest";
  version = "4.4";

  src = fetchFromGitHub {
    owner = "CxxTest";
    repo = pname;
    rev = version;
    sha256 = "19w92kipfhp5wvs47l0qpibn3x49sbmvkk91yxw6nwk6fafcdl17";
  };

  sourceRoot = "source/python";

  postCheck = ''
    python scripts/cxxtestgen --error-printer -o build/GoodSuite.cpp ../test/GoodSuite.h
    $CXX -I.. -o build/GoodSuite build/GoodSuite.cpp
    build/GoodSuite
  '';

  postInstall = ''
    mkdir -p "$out/include"
    cp -r ../cxxtest "$out/include"
  '';

  dontWrapPythonPrograms = true;

  meta = with stdenv.lib; {
    homepage = "http://cxxtest.com";
    description = "Unit testing framework for C++";
    platforms = platforms.unix;
    license = licenses.lgpl3;
    maintainers = [ maintainers.juliendehos ];
  };
}