diff options
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/pyside6/default.nix | 21 | ||||
-rw-r--r-- | pkgs/development/python-modules/pyside6/qt-6.7.1.patch | 87 | ||||
-rw-r--r-- | pkgs/development/python-modules/shiboken6/default.nix | 48 |
3 files changed, 20 insertions, 136 deletions
diff --git a/pkgs/development/python-modules/pyside6/default.nix b/pkgs/development/python-modules/pyside6/default.nix index 0144c91bd3e9e..79c691980ffbf 100644 --- a/pkgs/development/python-modules/pyside6/default.nix +++ b/pkgs/development/python-modules/pyside6/default.nix @@ -8,18 +8,12 @@ shiboken6, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pyside6"; inherit (shiboken6) version src; - patches = [ - # stripped down version of https://github.com/pyside/pyside-setup/commit/a0d68856d67ce6e178e3cfc2fccc236707e02fcd - # FIXME: remove in next release - ./qt-6.7.1.patch - ]; - - sourceRoot = "pyside-setup-everywhere-src-${version}/sources/${pname}"; + sourceRoot = "pyside-setup-everywhere-src-${finalAttrs.version}/sources/pyside6"; # FIXME: cmake/Macros/PySideModules.cmake supposes that all Qt frameworks on macOS # reside in the same directory as QtCore.framework, which is not true for Nix. @@ -80,18 +74,19 @@ stdenv.mkDerivation rec { cp -r PySide6.egg-info $out/${python.sitePackages}/ ''; - meta = with lib; { + meta = { description = "Python bindings for Qt"; - license = with licenses; [ + license = with lib.licenses; [ lgpl3Only gpl2Only gpl3Only ]; homepage = "https://wiki.qt.io/Qt_for_Python"; - maintainers = with maintainers; [ + changelog = "https://code.qt.io/cgit/pyside/pyside-setup.git/tree/doc/changelogs/changes-${finalAttrs.version}?h=v${finalAttrs.version}"; + maintainers = with lib.maintainers; [ gebner Enzime ]; - platforms = platforms.all; + platforms = lib.platforms.all; }; -} +}) diff --git a/pkgs/development/python-modules/pyside6/qt-6.7.1.patch b/pkgs/development/python-modules/pyside6/qt-6.7.1.patch deleted file mode 100644 index 8a5ece82d9cea..0000000000000 --- a/pkgs/development/python-modules/pyside6/qt-6.7.1.patch +++ /dev/null @@ -1,87 +0,0 @@ ---- a/PySide6/QtMultimedia/CMakeLists.txt -+++ b/PySide6/QtMultimedia/CMakeLists.txt -@@ -12,6 +12,7 @@ ${QtMultimedia_GEN_DIR}/qaudioinput_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qaudiooutput_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qaudiosink_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qaudiosource_wrapper.cpp -+${QtMultimedia_GEN_DIR}/qaudio_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qcameraformat_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qcameradevice_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qcamera_wrapper.cpp -@@ -28,7 +29,6 @@ ${QtMultimedia_GEN_DIR}/qmediatimerange_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qmediatimerange_interval_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qscreencapture_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qsoundeffect_wrapper.cpp --${QtMultimedia_GEN_DIR}/qtaudio_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qtvideo_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qvideoframe_wrapper.cpp - ${QtMultimedia_GEN_DIR}/qvideoframeformat_wrapper.cpp -diff --git a/PySide6/QtMultimedia/typesystem_multimedia.xml b/PySide6/QtMultimedia/typesystem_multimedia.xml -index dd58f41cc..d37eb15fd 100644 ---- a/PySide6/QtMultimedia/typesystem_multimedia.xml -+++ b/PySide6/QtMultimedia/typesystem_multimedia.xml -@@ -9,7 +9,7 @@ - <load-typesystem name="QtGui/typesystem_gui.xml" generate="no"/> - <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/> - -- <namespace-type name="QtAudio"> -+ <namespace-type name="QAudio"> - <enum-type name="Error"/> - <enum-type name="State"/> - <enum-type name="VolumeScale"/> -@@ -65,9 +65,6 @@ - </modify-argument> - </modify-function> - <modify-function signature="stop()" allow-thread="true"/> -- <!-- FIXME PYSIDE 7: Remove this (QT6_DECL_NEW_OVERLOAD_TAIL) --> -- <declare-function signature="state()const" return-type="QtAudio::State"/> -- <declare-function signature="error()const" return-type="QtAudio::Error"/> - </object-type> - - <object-type name="QAudioSink"> -@@ -82,9 +79,6 @@ - </modify-argument> - </modify-function> - <modify-function signature="stop()" allow-thread="true"/> -- <!-- FIXME PYSIDE 7: Remove this (QT6_DECL_NEW_OVERLOAD_TAIL) --> -- <declare-function signature="state()const" return-type="QtAudio::State"/> -- <declare-function signature="error()const" return-type="QtAudio::Error"/> - </object-type> - - <object-type name="QCamera"> -diff --git a/PySide6/glue/qtmultimedia.cpp b/PySide6/glue/qtmultimedia.cpp -index d193b1bd3..ac8434b97 100644 ---- a/PySide6/glue/qtmultimedia.cpp -+++ b/PySide6/glue/qtmultimedia.cpp -@@ -2,6 +2,7 @@ - // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only - - // @snippet qvideoframe-bits -+#include "object.h" - %BEGIN_ALLOW_THREADS - %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1); - %END_ALLOW_THREADS -@@ -23,5 +24,5 @@ const auto size = %CPPSELF.byteCount(); - - // @snippet qtaudio-namespace-compatibility-alias - Py_INCREF(pyType); --PyModule_AddObject(module, "QAudio", reinterpret_cast<PyObject *>(pyType)); -+PyModule_AddObject(module, "QtAudio", reinterpret_cast<PyObject *>(pyType)); - // @snippet qtaudio-namespace-compatibility-alias -diff --git a/libpyside/signalmanager.cpp b/libpyside/signalmanager.cpp -index 625e4a405..557f130e0 100644 ---- a/libpyside/signalmanager.cpp -+++ b/libpyside/signalmanager.cpp -@@ -813,11 +813,6 @@ static PyObject *parseArguments(const QMetaMethod &method, void **args) - for (qsizetype i = 0; i < argsSize; ++i) { - void *data = args[i+1]; - auto param = paramTypes.at(i); --#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) -- // Qt 6.7 renamed namespace "QAudio"->"QtAudio" except for signals -- if (param.startsWith("QAudio::"_ba)) -- param.insert(1, 't'); --#endif - Shiboken::Conversions::SpecificConverter converter(param.constData()); - if (!converter) { - PyErr_SetString(PyExc_TypeError, msgCannotConvertParameter(method, i).constData()); - diff --git a/pkgs/development/python-modules/shiboken6/default.nix b/pkgs/development/python-modules/shiboken6/default.nix index 5bf11c0a14a59..39c61bc8cc3b5 100644 --- a/pkgs/development/python-modules/shiboken6/default.nix +++ b/pkgs/development/python-modules/shiboken6/default.nix @@ -1,7 +1,6 @@ { lib, fetchurl, - fetchpatch, llvmPackages, python, cmake, @@ -12,28 +11,19 @@ let stdenv' = if stdenv.cc.isClang then stdenv else llvmPackages.stdenv; in -stdenv'.mkDerivation rec { +stdenv'.mkDerivation (finalAttrs: { pname = "shiboken6"; - version = "6.7.0"; + version = "6.7.2"; src = fetchurl { # https://download.qt.io/official_releases/QtForPython/shiboken6/ - url = "https://download.qt.io/official_releases/QtForPython/shiboken6/PySide6-${version}-src/pyside-setup-everywhere-src-${version}.tar.xz"; - hash = "sha256-gurjcHN99ez1OcFl0J18gdX8YVOlQbjT03sRJ1+ePo8="; + url = "mirror://qt/official_releases/QtForPython/shiboken6/PySide6-${finalAttrs.version}-src/pyside-setup-everywhere-src-${finalAttrs.version}.tar.xz"; + hash = "sha256-OisNDW54yapd3H8GyktvEaP+FFYLrrFI7qU7XZjjaMc="; }; - sourceRoot = "pyside-setup-everywhere-src-${version}/sources/${pname}"; + sourceRoot = "pyside-setup-everywhere-src-${finalAttrs.version}/sources/shiboken6"; - patches = [ - ./fix-include-qt-headers.patch - # Remove this patch when updating to 6.8.0 - (fetchpatch { - name = "backwards-compatibility-with-6.6.x.patch"; - url = "https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=4f9a20e3635f4f0957e0774588b1d9156e88a572"; - hash = "sha256-B2jhLWopgaSF/rUXMZFPZArDUNojlBgn7kdVyQull+I="; - stripLen = 2; - }) - ]; + patches = [ ./fix-include-qt-headers.patch ]; nativeBuildInputs = [ cmake @@ -57,21 +47,6 @@ stdenv'.mkDerivation rec { substituteInPlace cmake/ShibokenHelpers.cmake --replace-fail '#!/bin/bash' '#!''${BASH}' ''; - # Due to Shiboken.abi3.so being linked to libshiboken6.abi3.so.6.6 in the build tree, - # we need to remove the build tree reference from the RPATH and then add the correct - # directory to the RPATH. On Linux, the second part is handled by autoPatchelfHook. - # https://bugreports.qt.io/browse/PYSIDE-2233 - preFixup = - '' - echo "fixing RPATH of Shiboken.abi3.so" - '' - + lib.optionalString stdenv.isDarwin '' - install_name_tool -change {@rpath,$out/lib}/libshiboken6.abi3.6.6.dylib $out/${python.sitePackages}/shiboken6/Shiboken.abi3.so - '' - + lib.optionalString stdenv.isLinux '' - patchelf $out/${python.sitePackages}/shiboken6/Shiboken.abi3.so --shrink-rpath --allowed-rpath-prefixes ${builtins.storeDir} - ''; - postInstall = '' cd ../../.. ${python.pythonOnBuildForHost.interpreter} setup.py egg_info --build-type=shiboken6 @@ -80,18 +55,19 @@ stdenv'.mkDerivation rec { dontWrapQtApps = true; - meta = with lib; { + meta = { description = "Generator for the pyside6 Qt bindings"; - license = with licenses; [ + license = with lib.licenses; [ lgpl3Only gpl2Only gpl3Only ]; homepage = "https://wiki.qt.io/Qt_for_Python"; - maintainers = with maintainers; [ + changelog = "https://code.qt.io/cgit/pyside/pyside-setup.git/tree/doc/changelogs/changes-${finalAttrs.version}?h=v${finalAttrs.version}"; + maintainers = with lib.maintainers; [ gebner Enzime ]; - platforms = platforms.all; + platforms = lib.platforms.all; }; -} +}) |