nixpkgs/pkgs/development/libraries/qt-5/5.12/qttools.patch
Matthew Bauer 79c0e740a7 qttools: patch qmlimportscanner for darwin builds
This needs to be the full path for qtmacdeploy to work. We add
${qt5.qttools.dev}/bin/qmlimportscanner as the default.

Fixes #63093
2019-06-22 22:21:38 -04:00

16 lines
703 B
Diff

--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -1241,6 +1241,12 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
if (!QFile(qmlImportScannerPath).exists())
qmlImportScannerPath = QCoreApplication::applicationDirPath() + "/qmlimportscanner";
+#ifdef NIXPKGS_QMLIMPORTSCANNER
+ // Fallback: Nixpkgs hardcoded path
+ if (!QFile(qmlImportScannerPath).exists())
+ qmlImportScannerPath = NIXPKGS_QMLIMPORTSCANNER;
+#endif
+
// Verify that we found a qmlimportscanner binary
if (!QFile(qmlImportScannerPath).exists()) {
LogError() << "qmlimportscanner not found at" << qmlImportScannerPath;