1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pkgs,
7 qtbase,
8 qmake,
9 soqt,
10}:
11
12buildPythonPackage rec {
13 pname = "pivy";
14 version = "0.6.10";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "coin3d";
19 repo = "pivy";
20 tag = version;
21 hash = "sha256-DRA4NTAHg2iB/D1CU9pJEpsZwX9GW3X5gpxbIwP54Ko=";
22 };
23
24 build-system = [ setuptools ];
25
26 dontUseCmakeConfigure = true;
27
28 nativeBuildInputs = with pkgs; [
29 swig
30 qmake
31 cmake
32 ];
33
34 buildInputs =
35 with pkgs;
36 with xorg;
37 [
38 coin3d
39 soqt
40 qtbase
41 libGLU
42 libGL
43 libXi
44 libXext
45 libSM
46 libICE
47 libX11
48 ];
49
50 env.NIX_CFLAGS_COMPILE = toString [
51 "-I${qtbase.dev}/include/QtCore"
52 "-I${qtbase.dev}/include/QtGui"
53 "-I${qtbase.dev}/include/QtOpenGL"
54 "-I${qtbase.dev}/include/QtWidgets"
55 ];
56
57 dontUseQmakeConfigure = true;
58 dontWrapQtApps = true;
59 doCheck = false;
60
61 postPatch = ''
62 substituteInPlace distutils_cmake/CMakeLists.txt --replace \$'{SoQt_INCLUDE_DIRS}' \
63 \$'{Coin_INCLUDE_DIR}'\;\$'{SoQt_INCLUDE_DIRS}'
64 '';
65
66 pythonImportsCheck = [ "pivy" ];
67
68 meta = with lib; {
69 homepage = "https://github.com/coin3d/pivy/";
70 description = "Python binding for Coin";
71 license = licenses.bsd0;
72 maintainers = with maintainers; [ ];
73 };
74}