2022-10-21 11:09:37 +00:00
|
|
|
{ lib, python3Packages, fetchFromGitHub }:
|
2016-07-29 15:07:10 +00:00
|
|
|
|
2022-10-21 11:09:37 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2016-11-09 10:24:32 +00:00
|
|
|
pname = "cxxtest";
|
2016-07-29 15:07:10 +00:00
|
|
|
version = "4.4";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CxxTest";
|
2016-11-09 10:24:32 +00:00
|
|
|
repo = pname;
|
2016-07-29 15:07:10 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "19w92kipfhp5wvs47l0qpibn3x49sbmvkk91yxw6nwk6fafcdl17";
|
|
|
|
};
|
|
|
|
|
2020-06-27 16:52:38 +00:00
|
|
|
sourceRoot = "source/python";
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ python3Packages.ply ];
|
2022-10-21 11:09:37 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd ../
|
|
|
|
'';
|
|
|
|
|
2020-06-27 16:52:38 +00:00
|
|
|
postCheck = ''
|
2022-10-21 11:09:37 +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-06-27 16:52:38 +00:00
|
|
|
build/GoodSuite
|
|
|
|
'';
|
|
|
|
|
2022-10-21 11:09:37 +00:00
|
|
|
preInstall = ''
|
|
|
|
cd python3
|
|
|
|
'';
|
|
|
|
|
2020-06-27 16:52:38 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$out/include"
|
2022-10-21 11:09:37 +00:00
|
|
|
cp -r ../../cxxtest "$out/include"
|
2017-11-02 12:54:20 +00:00
|
|
|
'';
|
2016-07-29 15:07:10 +00:00
|
|
|
|
2020-06-27 16:52:38 +00:00
|
|
|
dontWrapPythonPrograms = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://cxxtest.com";
|
2016-07-29 15:07:10 +00:00
|
|
|
description = "Unit testing framework for C++";
|
|
|
|
license = licenses.lgpl3;
|
2022-10-21 11:09:37 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ juliendehos ];
|
2016-07-29 15:07:10 +00:00
|
|
|
};
|
|
|
|
}
|