Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildPythonApplication,
4 fetchFromGitHub,
5 ply,
6}:
7
8buildPythonApplication rec {
9 pname = "cxxtest";
10 version = "4.4";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "CxxTest";
15 repo = pname;
16 rev = version;
17 sha256 = "19w92kipfhp5wvs47l0qpibn3x49sbmvkk91yxw6nwk6fafcdl17";
18 };
19
20 sourceRoot = "${src.name}/python";
21
22 nativeCheckInputs = [ ply ];
23
24 preCheck = ''
25 cd ../
26 '';
27
28 postCheck = ''
29 cd python3
30 python scripts/cxxtestgen --error-printer -o build/GoodSuite.cpp ../../test/GoodSuite.h
31 $CXX -I../../ -o build/GoodSuite build/GoodSuite.cpp
32 build/GoodSuite
33 '';
34
35 preInstall = ''
36 cd python3
37 '';
38
39 postInstall = ''
40 mkdir -p "$out/include"
41 cp -r ../../cxxtest "$out/include"
42 '';
43
44 dontWrapPythonPrograms = true;
45
46 meta = with lib; {
47 homepage = "https://github.com/CxxTest/cxxtest";
48 description = "Unit testing framework for C++";
49 mainProgram = "cxxtestgen";
50 license = licenses.lgpl3;
51 platforms = platforms.unix;
52 maintainers = with maintainers; [ juliendehos ];
53 };
54}