nixpkgs-suyu/pkgs/development/libraries/cxxtest/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

48 lines
1 KiB
Nix

{ lib, python3Packages, fetchFromGitHub }:
python3Packages.buildPythonApplication rec {
pname = "cxxtest";
version = "4.4";
src = fetchFromGitHub {
owner = "CxxTest";
repo = pname;
rev = version;
sha256 = "19w92kipfhp5wvs47l0qpibn3x49sbmvkk91yxw6nwk6fafcdl17";
};
sourceRoot = "${src.name}/python";
nativeCheckInputs = [ python3Packages.ply ];
preCheck = ''
cd ../
'';
postCheck = ''
cd python3
python scripts/cxxtestgen --error-printer -o build/GoodSuite.cpp ../../test/GoodSuite.h
$CXX -I../../ -o build/GoodSuite build/GoodSuite.cpp
build/GoodSuite
'';
preInstall = ''
cd python3
'';
postInstall = ''
mkdir -p "$out/include"
cp -r ../../cxxtest "$out/include"
'';
dontWrapPythonPrograms = true;
meta = with lib; {
homepage = "http://cxxtest.com";
description = "Unit testing framework for C++";
mainProgram = "cxxtestgen";
license = licenses.lgpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ juliendehos ];
};
}