about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/cxxtest/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/cxxtest/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/cxxtest/default.nix25
1 files changed, 18 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/cxxtest/default.nix b/nixpkgs/pkgs/development/libraries/cxxtest/default.nix
index 3469cda3fc70..273bfef3190c 100644
--- a/nixpkgs/pkgs/development/libraries/cxxtest/default.nix
+++ b/nixpkgs/pkgs/development/libraries/cxxtest/default.nix
@@ -1,6 +1,6 @@
-{ lib, buildPythonApplication, fetchFromGitHub }:
+{ lib, python3Packages, fetchFromGitHub }:
 
-buildPythonApplication rec {
+python3Packages.buildPythonApplication rec {
   pname = "cxxtest";
   version = "4.4";
 
@@ -13,15 +13,26 @@ buildPythonApplication rec {
 
   sourceRoot = "source/python";
 
+  nativeCheckInputs = [ python3Packages.ply ];
+
+  preCheck = ''
+    cd ../
+  '';
+
   postCheck = ''
-    python scripts/cxxtestgen --error-printer -o build/GoodSuite.cpp ../test/GoodSuite.h
-    $CXX -I.. -o build/GoodSuite build/GoodSuite.cpp
+    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"
+    cp -r ../../cxxtest "$out/include"
   '';
 
   dontWrapPythonPrograms = true;
@@ -29,8 +40,8 @@ buildPythonApplication rec {
   meta = with lib; {
     homepage = "http://cxxtest.com";
     description = "Unit testing framework for C++";
-    platforms = platforms.unix;
     license = licenses.lgpl3;
-    maintainers = [ maintainers.juliendehos ];
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ juliendehos ];
   };
 }