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