1{
2 lib,
3 stdenv,
4 python,
5 fetchFromGitHub,
6 cmake,
7 fontconfig,
8 freetype,
9 libGL,
10 libGLU,
11 libX11,
12 libXext,
13 libXi,
14 libXmu,
15 opencascade-occt,
16 numpy,
17 rapidjson,
18 swig,
19}:
20
21stdenv.mkDerivation rec {
22 pname = "pythonocc-core";
23 version = "7.8.1.1";
24
25 src = fetchFromGitHub {
26 owner = "tpaviot";
27 repo = "pythonocc-core";
28 tag = version;
29 hash = "sha256-0o2PQEN0/Z7FUPZEo2HxFFa+mN2bZnYI++HVu4ONpNA=";
30 };
31
32 nativeBuildInputs = [
33 cmake
34 swig
35 ];
36 buildInputs = [
37 python
38 opencascade-occt
39 freetype
40 libGL
41 libGLU
42 libX11
43 libXext
44 libXmu
45 libXi
46 fontconfig
47 numpy
48 rapidjson
49 ];
50
51 cmakeFlags = [
52 "-Wno-dev"
53 "-DPYTHONOCC_INSTALL_DIRECTORY=${placeholder "out"}/${python.sitePackages}/OCC"
54 "-DPYTHONOCC_MESHDS_NUMPY=on"
55 ];
56
57 passthru = {
58 # `python3Packages.pythonocc-core` must be updated in tandem with
59 # `opencascade-occt`, and including it in the bulk updates often breaks it.
60 skipBulkUpdate = true;
61 };
62
63 meta = with lib; {
64 description = "Python wrapper for the OpenCASCADE 3D modeling kernel";
65 homepage = "https://github.com/tpaviot/pythonocc-core";
66 changelog = "https://github.com/tpaviot/pythonocc-core/releases/tag/${version}";
67 license = licenses.lgpl3;
68 platforms = platforms.unix;
69 maintainers = with maintainers; [ ];
70 };
71}