Commit b4999b22 authored by qbisi's avatar qbisi
Browse files

python3Packages.pivy: switch format to other

parent dc44762f
Loading
Loading
Loading
Loading
+9 −13
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
  python,
  pythonRecompileBytecodeHook,
  swig,
  cmake,
  coin3d,
@@ -13,7 +14,7 @@
buildPythonPackage rec {
  pname = "pivy";
  version = "0.6.10";
  pyproject = true;
  format = "other";

  src = fetchFromGitHub {
    owner = "coin3d";
@@ -22,20 +23,10 @@ buildPythonPackage rec {
    hash = "sha256-DRA4NTAHg2iB/D1CU9pJEpsZwX9GW3X5gpxbIwP54Ko=";
  };

  # https://github.com/coin3d/pivy/pull/138
  # FindThreads only works if either C or CXX language is enabled
  postPatch = ''
    substituteInPlace distutils_cmake/CMakeLists.txt \
      --replace-fail 'project(pivy_cmake_setup NONE)' 'project(pivy_cmake_setup CXX)'
  '';

  build-system = [ setuptools ];

  dontUseCmakeConfigure = true;

  nativeBuildInputs = [
    swig
    cmake
    pythonRecompileBytecodeHook
  ];

  buildInputs = [
@@ -44,6 +35,11 @@ buildPythonPackage rec {
    libGLU # dummy buildInput that provides missing header <GL/glu.h>
  ];

  cmakeFlags = [
    (lib.cmakeBool "PIVY_USE_QT6" true)
    (lib.cmakeFeature "PIVY_Python_SITEARCH" "${placeholder "out"}/${python.sitePackages}")
  ];

  dontWrapQtApps = true;

  pythonImportsCheck = [ "pivy" ];