about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cadquery/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cadquery/default.nix')
-rw-r--r--pkgs/development/python-modules/cadquery/default.nix33
1 files changed, 22 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/cadquery/default.nix b/pkgs/development/python-modules/cadquery/default.nix
index 6f3632f743bea..886224d16918d 100644
--- a/pkgs/development/python-modules/cadquery/default.nix
+++ b/pkgs/development/python-modules/cadquery/default.nix
@@ -2,6 +2,7 @@
   , buildPythonPackage
   , isPy3k
   , pythonOlder
+  , pythonAtLeast
   , fetchFromGitHub
   , pyparsing
   , opencascade
@@ -16,9 +17,12 @@
   , libGLU
   , libX11
   , six
+  , pytest
+  , makeFontsConf
+  , freefont_ttf
 }:
 
-let 
+let
   pythonocc-core-cadquery = stdenv.mkDerivation {
     pname = "pythonocc-core-cadquery";
     version = "0.18.2";
@@ -31,7 +35,7 @@ let
       sha256 = "07zmiiw74dyj4v0ar5vqkvk30wzcpjjzbi04nsdk5mnlzslmyi6c";
     };
 
-    nativeBuildInputs = [ 
+    nativeBuildInputs = [
       cmake
       swig
       ninja
@@ -63,27 +67,34 @@ let
 in
   buildPythonPackage rec {
     pname = "cadquery";
-    version = "2.0RC0";
-  
+    version = "2.0";
+
     src = fetchFromGitHub {
       owner = "CadQuery";
       repo = pname;
       rev = version;
-      sha256 = "1xgd00rih0gjcnlrf9s6r5a7ypjkzgf2xij2b6436i76h89wmir3";
+      sha256 = "1n63b6cjjrdwdfmwq0zx1xabjnhndk9mgfkm4w7z9ardcfpvg84l";
     };
-  
+
     buildInputs = [
       opencascade
     ];
-  
+
     propagatedBuildInputs = [
       pyparsing
       pythonocc-core-cadquery
     ];
-  
-    # Build errors on 2.7 and >=3.8 (officially only supports 3.6 and 3.7).
-    disabled = !(isPy3k && (pythonOlder "3.8"));
-  
+
+    FONTCONFIG_FILE = makeFontsConf {
+      fontDirectories = [ freefont_ttf ];
+    };
+
+    checkInputs = [
+      pytest
+    ];
+
+    disabled = pythonOlder "3.6" || pythonAtLeast "3.8";
+
     meta = with lib; {
       description = "Parametric scripting language for creating and traversing CAD models";
       homepage = "https://github.com/CadQuery/cadquery";