about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/qt-6/patches
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-08-23 10:09:14 +0000
committerAlyssa Ross <hi@alyssa.is>2023-08-26 09:07:03 +0000
commit63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f (patch)
treed58934cb48f9c953b19a0d0d5cffc0d0c5561471 /nixpkgs/pkgs/development/libraries/qt-6/patches
parentc4eef3dacb2a3d359561f30917d9e3cc4e041be9 (diff)
parent91a22f76cd1716f9d0149e8a5c68424bb691de15 (diff)
downloadnixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.gz
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.bz2
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.lz
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.xz
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.tar.zst
nixlib-63dabcc77ef9a56655e1ca2ab2e25e6163a72c1f.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/development/python-modules/django-mailman3/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qt-6/patches')
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-environment.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-actuall.patch35
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch30
-rw-r--r--nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch10
4 files changed, 110 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-environment.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-environment.patch
new file mode 100644
index 000000000000..32e30679ec59
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0008-qtbase-find-qmlimportscanner-in-macdeployqt-via-environment.patch
@@ -0,0 +1,35 @@
+From 505391a31aa353b8f1cc5d3feb9861582554d9f1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org>
+Date: Wed, 9 Aug 2023 16:16:21 +0200
+Subject: [PATCH 1/3] Find qmlimportscanner in macdeployqt via environment
+
+The qmlimportscanner tool is provided by qtdeclarative. Because of the
+modularized installation in Nix, it can not be found via the usual
+mechanisms.  Also, hard-coding it like we do for Qt5 would also not
+work, as it would require making qtbase depend on qtdeclarative.
+
+Here we add an option to provide its location via the environment.
+While this means macdeployqt does not work out of the box, it provides
+a workaround for users.
+---
+ src/tools/macdeployqt/shared/shared.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
+index 643fe5390a..b8fcc9c9bd 100644
+--- a/src/tools/macdeployqt/shared/shared.cpp
++++ b/src/tools/macdeployqt/shared/shared.cpp
+@@ -1270,6 +1270,10 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+     if (!QFile::exists(qmlImportScannerPath))
+         qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner";
+ 
++    // Fallback: Pass qml import scanner via environment variable
++    if (!QFile::exists(qmlImportScannerPath))
++        qmlImportScannerPath = ::qgetenv("NIX_QMLIMPORTSCANNER");
++
+     // Verify that we found a qmlimportscanner binary
+     if (!QFile::exists(qmlImportScannerPath)) {
+         LogError() << "qmlimportscanner not found at" << qmlImportScannerPath;
+-- 
+2.26.2
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-actuall.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-actuall.patch
new file mode 100644
index 000000000000..4436d512d9d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0009-qtbase-check-in-the-QML-folder-of-this-library-does-actuall.patch
@@ -0,0 +1,35 @@
+From 32df59bea18bebc18d6d308750e88be325522d2e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org>
+Date: Thu, 10 Aug 2023 14:15:34 +0200
+Subject: [PATCH 2/3] Check in the QML folder of this library does actually
+ exist
+
+In a modularized installation, this folder will be the location where
+`qtbase` itself is installed, but `qtbase` does not have any QML
+code, and `qmlimportscanner` will complain that it does not exist.
+---
+ src/tools/macdeployqt/shared/shared.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
+index b8fcc9c9bd..676d34d545 100644
+--- a/src/tools/macdeployqt/shared/shared.cpp
++++ b/src/tools/macdeployqt/shared/shared.cpp
+@@ -1290,9 +1290,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+     }
+     for (const QString &importPath : qmlImportPaths)
+         argumentList << "-importPath" << importPath;
++
+     QString qmlImportsPath = QLibraryInfo::path(QLibraryInfo::QmlImportsPath);
+-    argumentList.append( "-importPath");
+-    argumentList.append(qmlImportsPath);
++    if (QFile::exists(qmlImportsPath)) {
++        argumentList.append( "-importPath");
++        argumentList.append(qmlImportsPath);
++    }
+ 
+     // run qmlimportscanner
+     QProcess qmlImportScanner;
+-- 
+2.26.2
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
new file mode 100644
index 000000000000..81f0f76636d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/0010-qtbase-pass-to-qmlimportscanner-the-QML2_IMPORT_PATH.patch
@@ -0,0 +1,30 @@
+From 39eb99dcd66f8ffb632fed6308a49896fe5ad2d3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= <raskolnikov@gnu.org>
+Date: Thu, 10 Aug 2023 14:17:03 +0200
+Subject: [PATCH 3/3] Pass to qmlimportscanner the QML2_IMPORT_PATH
+
+---
+ src/tools/macdeployqt/shared/shared.cpp | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
+index 676d34d545..7908b07b3c 100644
+--- a/src/tools/macdeployqt/shared/shared.cpp
++++ b/src/tools/macdeployqt/shared/shared.cpp
+@@ -1297,6 +1297,13 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
+         argumentList.append(qmlImportsPath);
+     }
+ 
++    // In a modularized installation of qt as we have in Nix, instead, we will
++    // read the paths from the environment, as they are spread in multiple
++    // locations and normally set in the environment like this
++    auto envQmlImportPaths = ::qgetenv("QML2_IMPORT_PATH").split(':');
++    for (const QString &importPath : envQmlImportPaths)
++        argumentList << "-importPath" << importPath;
++
+     // run qmlimportscanner
+     QProcess qmlImportScanner;
+     qmlImportScanner.start(qmlImportScannerPath, argumentList);
+-- 
+2.26.2
+
diff --git a/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch
new file mode 100644
index 000000000000..31516c41beb0
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/qt-6/patches/qtwebengine-link-pulseaudio.patch
@@ -0,0 +1,10 @@
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -341,6 +341,7 @@
+             devtools_fast_bundle=false
+             devtools_skip_typecheck=false
+             enable_jxl_decoder=false # temporarily because libjxl causes internal compiler error on armv7
++            link_pulseaudio=true
+         )
+
+         extend_gn_list(gnArgArg
\ No newline at end of file