at 24.11-pre 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 pyqt5, 7 pyqt-builder, 8 python, 9 pythonOlder, 10 qt3d, 11 setuptools, 12 sip, 13}: 14 15buildPythonPackage rec { 16 pname = "pyqt3d"; 17 version = "5.15.6"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchPypi { 23 pname = "PyQt3D"; 24 inherit version; 25 hash = "sha256-fWxtVc2PwiGzE8mVwPhymjdxFJJvA3f46QEdRevziBw="; 26 }; 27 28 postPatch = '' 29 substituteInPlace pyproject.toml \ 30 --replace "[tool.sip.project]" "[tool.sip.project]''\nsip-include-dirs = [\"${pyqt5}/${python.sitePackages}/PyQt5/bindings\"]" 31 ''; 32 33 outputs = [ 34 "out" 35 "dev" 36 ]; 37 38 enableParallelBuilding = true; 39 # HACK: paralellize compilation of make calls within pyqt's setup.py 40 # pkgs/stdenv/generic/setup.sh doesn't set this for us because 41 # make gets called by python code and not its build phase 42 # format=pyproject means the pip-build-hook hook gets used to build this project 43 # pkgs/development/interpreters/python/hooks/pip-build-hook.sh 44 # does not use the enableParallelBuilding flag 45 preBuild = '' 46 export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}" 47 ''; 48 49 dontWrapQtApps = true; 50 51 nativeBuildInputs = [ 52 sip 53 qt3d 54 setuptools 55 pyqt-builder 56 ]; 57 58 buildInputs = [ qt3d ]; 59 60 propagatedBuildInputs = [ pyqt5 ]; 61 62 dontConfigure = true; 63 64 # has no tests 65 doCheck = false; 66 67 pythonImportsCheck = [ "PyQt5.Qt3DCore" ]; 68 69 meta = with lib; { 70 description = "Python bindings for the Qt 3D framework"; 71 homepage = "https://riverbankcomputing.com/"; 72 license = licenses.gpl3Only; 73 maintainers = with maintainers; [ panicgh ]; 74 }; 75}