Various: Move to Qt6 (#487941)

This commit is contained in:
Dmitry Kalinkin
2026-02-08 19:12:45 +00:00
committed by GitHub
10 changed files with 45 additions and 24 deletions
+5 -4
View File
@@ -1,10 +1,9 @@
{
lib,
fetchpatch,
python3,
fetchFromGitHub,
qt5,
cups,
qt6,
}:
python3.pkgs.buildPythonApplication rec {
@@ -24,7 +23,9 @@ python3.pkgs.buildPythonApplication rec {
--replace-fail ", 'lpr', " ", '${cups}/bin/lpr', "
'';
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
nativeBuildInputs = [ qt6.wrapQtAppsHook ];
buildInputs = [ qt6.qtbase ];
build-system = with python3.pkgs; [ setuptools ];
@@ -37,7 +38,7 @@ python3.pkgs.buildPythonApplication rec {
pyserial
pycups
qtconsole
pyqt5
pyqt6
];
# QtApplication.instance() does not work during tests?
@@ -4,7 +4,6 @@
fetchFromGitHub,
enaml,
pyqtgraph,
pyqt5,
pythonocc-core,
typing-extensions,
}:
@@ -25,7 +24,6 @@ buildPythonPackage rec {
enaml
# Until https://github.com/inkcut/inkcut/issues/105 perhaps
pyqtgraph
pyqt5
pythonocc-core
typing-extensions
];
@@ -8,6 +8,9 @@
napari, # a reverse-dependency, for tests
psygnal,
pyside2,
pyside6,
pyqt6,
pyqt5,
pytestCheckHook,
superqt,
typing-extensions,
@@ -33,11 +36,17 @@ buildPythonPackage rec {
dependencies = [
typing-extensions
superqt
pyside2
psygnal
docstring-parser
];
optional-dependencies = {
pyside2 = [ pyside2 ];
pyside6 = [ pyside6 ];
pyqt6 = [ pyqt6 ];
pyqt5 = [ pyqt5 ];
};
nativeCheckInputs = [ pytestCheckHook ];
doCheck = false; # Reports "Fatal Python error"
@@ -1,6 +1,5 @@
{
lib,
mkDerivationWith,
buildPythonPackage,
fetchFromGitHub,
@@ -9,7 +8,7 @@
setuptools-scm,
# nativeBuildInputs
wrapQtAppsHook,
qt6,
# dependencies
app-model,
@@ -54,7 +53,7 @@
zarr,
}:
mkDerivationWith buildPythonPackage rec {
buildPythonPackage rec {
pname = "napari";
version = "0.6.6";
pyproject = true;
@@ -76,7 +75,11 @@ mkDerivationWith buildPythonPackage rec {
setuptools-scm
];
nativeBuildInputs = [ wrapQtAppsHook ];
nativeBuildInputs = [ qt6.wrapQtAppsHook ];
buildInputs = [
qt6.qtbase
];
pythonRelaxDeps = [
"app-model"
@@ -4,7 +4,7 @@
fetchFromGitHub,
twisted,
qtpy,
pyqt5,
pyqt6,
}:
buildPythonPackage {
@@ -19,12 +19,14 @@ buildPythonPackage {
sha256 = "1nb5iwg0nfz86shw28a2kj5pyhd4jvvxhf73fhnfbl8scgnvjv9h";
};
strictDeps = true;
propagatedBuildInputs = [
twisted
qtpy
];
nativeCheckInputs = [ pyqt5 ];
nativeCheckInputs = [ pyqt6 ];
pythonImportsCheck = [ "qreactor" ];
@@ -2,7 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pyqt5,
pyqt6,
pytestCheckHook,
qtpy,
}:
@@ -20,7 +20,7 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [
pyqt5
pyqt6
qtpy
];
@@ -11,7 +11,7 @@
jupyter-core,
jupyter-client,
pygments,
pyqt5,
pyqt6,
qtpy,
traitlets,
@@ -38,7 +38,7 @@ buildPythonPackage rec {
jupyter-core
jupyter-client
pygments
pyqt5
pyqt6
qtpy
traitlets
];
@@ -4,7 +4,7 @@
fetchPypi,
# nativeBuildInputs
pyqtwebengine,
pyqt6-webengine,
# build-system
setuptools,
@@ -36,6 +36,7 @@
pylint-venv,
pyls-spyder,
pyopengl,
pyqt6,
python-lsp-black,
python-lsp-ruff,
python-lsp-server,
@@ -55,6 +56,7 @@
three-merge,
watchdog,
yarl,
qt6,
}:
buildPythonPackage rec {
@@ -69,7 +71,7 @@ buildPythonPackage rec {
patches = [ ./dont-clear-pythonpath.patch ];
nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
nativeBuildInputs = [ qt6.wrapQtAppsHook ];
build-system = [ setuptools ];
@@ -78,6 +80,11 @@ buildPythonPackage rec {
"python-lsp-server"
];
buildInputs = [
qt6.qtbase
qt6.qtwayland
];
dependencies = [
aiohttp
asyncssh
@@ -105,7 +112,7 @@ buildPythonPackage rec {
pylint-venv
pyls-spyder
pyopengl
pyqtwebengine
pyqt6-webengine
python-lsp-black
python-lsp-ruff
python-lsp-server
@@ -125,12 +132,15 @@ buildPythonPackage rec {
three-merge
watchdog
yarl
pyqt6
]
++ python-lsp-server.optional-dependencies.all;
# There is no test for spyder
doCheck = false;
env.SPYDER_QT_BINDING = "pyqt6";
postInstall = ''
# Add Python libs to env so Spyder subprocesses
# created to run compute kernels don't fail with ImportErrors
@@ -34,7 +34,6 @@ buildPythonPackage rec {
dependencies = [
pygments
pyqt5
qtpy
typing-extensions
];
@@ -44,6 +43,7 @@ buildPythonPackage rec {
pyside2 = [ pyside2 ];
pyside6 = [ pyside6 ];
pyqt6 = [ pyqt6 ];
pyqt5 = [ pyqt5 ];
};
nativeCheckInputs = [ pytestCheckHook ];
+1 -3
View File
@@ -10669,9 +10669,7 @@ self: super: with self; {
napalm-ros = callPackage ../development/python-modules/napalm/ros.nix { };
napari = callPackage ../development/python-modules/napari {
inherit (pkgs.libsForQt5) mkDerivationWith wrapQtAppsHook;
};
napari = callPackage ../development/python-modules/napari { };
napari-console = callPackage ../development/python-modules/napari-console { };