nixpkgs/pkgs/development/libraries/cxxtest/default.nix

48 lines
1013 B
Nix
Raw Normal View History

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";
};
sourceRoot = "source/python";
nativeCheckInputs = [ python3Packages.ply ];
2022-10-21 11:09:37 +00:00
preCheck = ''
cd ../
'';
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
build/GoodSuite
'';
2022-10-21 11:09:37 +00:00
preInstall = ''
cd python3
'';
postInstall = ''
mkdir -p "$out/include"
2022-10-21 11:09:37 +00:00
cp -r ../../cxxtest "$out/include"
'';
2016-07-29 15:07:10 +00:00
dontWrapPythonPrograms = true;
meta = with lib; {
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
};
}