Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pyqt6-charts.nix
blob6d2a110c8890dfad2b37f2bbeb7f2c373b7b4e0a
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , sip
5 , pyqt-builder
6 , qt6Packages
7 , pythonOlder
8 , pyqt6
9 , python
12 buildPythonPackage rec {
13   pname = "PyQt6_Charts";
14   version = "6.5.0";
15   format = "pyproject";
17   disabled = pythonOlder "3.6";
19   src = fetchPypi {
20     inherit pname version;
21     sha256 = "sha256-b/APZbJRf5m/EG3dKMdvPKNE+R7PW6aBkeIKLZACSWI=";
22   };
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   '';
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   '';
44   dontWrapQtApps = true;
46   nativeBuildInputs = with qt6Packages; [
47     qtcharts
48     sip
49     qmake
50     pyqt-builder
51   ];
53   buildInputs = with qt6Packages; [
54     qtcharts
55   ];
57   propagatedBuildInputs = [
58     pyqt6
59   ];
61   dontConfigure = true;
63   # has no tests
64   doCheck = false;
66   pythonImportsCheck = [
67     "PyQt6.QtCharts"
68   ];
70   meta = with lib; {
71     description = "Python bindings for Qt6 QtCharts";
72     homepage = "https://riverbankcomputing.com/";
73     license = licenses.gpl3Only;
74     platforms = platforms.mesaPlatforms;
75     maintainers = with maintainers; [ dandellion ];
76   };