about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pivy/default.nix
blob: a5ad0d280fd8172f77fdfdc216911536c00deb1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pkgs,
  qtbase,
  qmake,
  soqt,
}:

buildPythonPackage rec {
  pname = "pivy";
  version = "0.6.8";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "coin3d";
    repo = "pivy";
    rev = "refs/tags/${version}";
    hash = "sha256-y72nzZAelyRDR2JS73/0jo2x/XiDZpsERPZV3gzIhAI=";
  };

  dontUseCmakeConfigure = true;

  nativeBuildInputs = with pkgs; [
    swig
    qmake
    cmake
  ];

  buildInputs =
    with pkgs;
    with xorg;
    [
      coin3d
      soqt
      qtbase
      libGLU
      libGL
      libXi
      libXext
      libSM
      libICE
      libX11
    ];

  env.NIX_CFLAGS_COMPILE = toString [
    "-I${qtbase.dev}/include/QtCore"
    "-I${qtbase.dev}/include/QtGui"
    "-I${qtbase.dev}/include/QtOpenGL"
    "-I${qtbase.dev}/include/QtWidgets"
  ];

  dontUseQmakeConfigure = true;
  dontWrapQtApps = true;
  doCheck = false;

  postPatch = ''
    substituteInPlace distutils_cmake/CMakeLists.txt --replace \$'{SoQt_INCLUDE_DIRS}' \
      \$'{Coin_INCLUDE_DIR}'\;\$'{SoQt_INCLUDE_DIRS}'
  '';

  meta = with lib; {
    homepage = "https://github.com/coin3d/pivy/";
    description = "Python binding for Coin";
    license = licenses.bsd0;
    maintainers = with maintainers; [ gebner ];
  };
}