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