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