2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
sip,
|
|
|
|
pyqt-builder,
|
|
|
|
qt6Packages,
|
|
|
|
pythonOlder,
|
|
|
|
pyqt6,
|
|
|
|
python,
|
2023-03-15 16:39:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "pyqt6-charts";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "6.7.0";
|
2023-03-15 16:39:30 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "PyQt6_Charts";
|
|
|
|
inherit version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-xPfPNpko978DLk4z9xjTuP5m2hdtSVn+MHNalw2G81w=";
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# fix include path and increase verbosity
|
|
|
|
postPatch = ''
|
|
|
|
sed -i \
|
|
|
|
'/\[tool.sip.project\]/a\
|
|
|
|
verbose = true\
|
|
|
|
sip-include-dirs = [\"${pyqt6}/${python.sitePackages}/PyQt6/bindings\"]' \
|
|
|
|
pyproject.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# HACK: paralellize compilation of make calls within pyqt's setup.py
|
|
|
|
# pkgs/stdenv/generic/setup.sh doesn't set this for us because
|
|
|
|
# make gets called by python code and not its build phase
|
|
|
|
# format=pyproject means the pip-build-hook hook gets used to build this project
|
|
|
|
# pkgs/development/interpreters/python/hooks/pip-build-hook.sh
|
|
|
|
# does not use the enableParallelBuilding flag
|
|
|
|
preBuild = ''
|
|
|
|
export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = with qt6Packages; [
|
|
|
|
qtcharts
|
|
|
|
sip
|
|
|
|
qmake
|
|
|
|
pyqt-builder
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = with qt6Packages; [ qtcharts ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ pyqt6 ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
# has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "PyQt6.QtCharts" ];
|
2023-03-15 16:39:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for Qt6 QtCharts";
|
|
|
|
homepage = "https://riverbankcomputing.com/";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.mesaPlatforms;
|
|
|
|
maintainers = with maintainers; [ dandellion ];
|
|
|
|
};
|
|
|
|
}
|