2022-10-30 15:09:59 +00:00
|
|
|
{ lib, python3Packages, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "cxxtest";
|
|
|
|
version = "4.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CxxTest";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "19w92kipfhp5wvs47l0qpibn3x49sbmvkk91yxw6nwk6fafcdl17";
|
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/python";
|
2020-11-03 02:18:15 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ python3Packages.ply ];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd ../
|
|
|
|
'';
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
postCheck = ''
|
2022-10-30 15:09:59 +00:00
|
|
|
cd python3
|
|
|
|
python scripts/cxxtestgen --error-printer -o build/GoodSuite.cpp ../../test/GoodSuite.h
|
|
|
|
$CXX -I../../ -o build/GoodSuite build/GoodSuite.cpp
|
2020-11-03 02:18:15 +00:00
|
|
|
build/GoodSuite
|
|
|
|
'';
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
preInstall = ''
|
|
|
|
cd python3
|
|
|
|
'';
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/include"
|
2022-10-30 15:09:59 +00:00
|
|
|
cp -r ../../cxxtest "$out/include"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
dontWrapPythonPrograms = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://cxxtest.com";
|
|
|
|
description = "Unit testing framework for C++";
|
|
|
|
license = licenses.lgpl3;
|
2022-10-30 15:09:59 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ juliendehos ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|