python312Packages.pyside6: 6.8.0 -> 6.8.0.2, cherry-pick patch

Patch fixes building Falkon and probably more things that use PySide.QtWebEngine.
This commit is contained in:
K900
2024-11-08 12:43:07 +03:00
parent 780f200e8f
commit 28335ee34d
3 changed files with 38 additions and 5 deletions
@@ -1,6 +1,7 @@
{
lib,
stdenv,
fetchpatch,
cmake,
cups,
ninja,
@@ -57,7 +58,14 @@ stdenv.mkDerivation (finalAttrs: {
inherit (shiboken6) version src;
sourceRoot = "pyside-setup-everywhere-src-${finalAttrs.version}/sources/pyside6";
sourceRoot = "pyside-setup-everywhere-src-6.8.0/sources/pyside6";
patches = [
# Manual backport of https://code.qt.io/cgit/pyside/pyside-setup.git/patch/?id=cacc9c5803a6dec820dd46211a836453183c8dab
# to fit our structure.
# FIXME: remove for 6.8.1
./fix-installing-docs.patch
];
# 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.
@@ -0,0 +1,25 @@
--- a/cmake/Macros/PySideModules.cmake
+++ b/cmake/Macros/PySideModules.cmake
@@ -176,6 +176,14 @@ macro(create_pyside_module)
set(${module_NAME}_glue_dependency ${${module_NAME}_glue})
endif()
+ # Install module doc files.
+ set(${module_NAME}_doc "${CMAKE_CURRENT_SOURCE_DIR}/../doc/${lower_module_name}.rst")
+ set(${module_name}_doc_dependency "")
+ if(EXISTS ${${module_NAME}_doc})
+ install(FILES ${${module_NAME}_doc} DESTINATION share/PySide6${pyside6_SUFFIX}/doc)
+ set(${module_NAME}_doc_dependency ${${module_NAME}_doc})
+ endif()
+
# Install standalone glue files into typesystems subfolder, so that the resolved relative
# paths remain correct.
if (module_GLUE_SOURCES)
@@ -245,6 +253,7 @@ macro(create_pyside_module)
DEPENDS ${total_type_system_files}
${module_GLUE_SOURCES}
${${module_NAME}_glue_dependency}
+ ${${module_NAME}_doc_dependency}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Running generator for ${module_NAME}...")
@@ -13,16 +13,16 @@ let
in
stdenv'.mkDerivation (finalAttrs: {
pname = "shiboken6";
version = "6.8";
version = "6.8.0.2";
src = fetchurl {
# https://download.qt.io/official_releases/QtForPython/shiboken6/
# FIXME: inconsistent version numbers in directory name and tarball?
url = "mirror://qt/official_releases/QtForPython/shiboken6/PySide6-${finalAttrs.version}.0-src/pyside-setup-everywhere-src-${finalAttrs.version}.tar.xz";
hash = "sha256-XAWtOufnJ51tudyUpG6woF/Qk1NzCfdDnDhnG9clUZA=";
url = "mirror://qt/official_releases/QtForPython/shiboken6/PySide6-6.8.0.2-src/pyside-setup-everywhere-src-6.8.0.tar.xz";
hash = "sha256-Ghohmo8yfjQNJYJ1+tOp8mG48EvFcEF0fnPdatJStOE=";
};
sourceRoot = "pyside-setup-everywhere-src-${finalAttrs.version}/sources/shiboken6";
sourceRoot = "pyside-setup-everywhere-src-6.8.0/sources/shiboken6";
patches = [ ./fix-include-qt-headers.patch ];