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
This commit is contained in:
parent
6f40e5d9a2
commit
79c0e740a7
@ -69,3 +69,18 @@ index 4318b16f..d60db4ff 100644
|
|||||||
_qt5_LinguistTools_check_file_exists(${imported_location})
|
_qt5_LinguistTools_check_file_exists(${imported_location})
|
||||||
|
|
||||||
set_target_properties(Qt5::lconvert PROPERTIES
|
set_target_properties(Qt5::lconvert PROPERTIES
|
||||||
|
--- 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;
|
||||||
|
@ -66,6 +66,7 @@ let
|
|||||||
./qtwebkit-darwin-no-readline.patch
|
./qtwebkit-darwin-no-readline.patch
|
||||||
./qtwebkit-darwin-no-qos-classes.patch
|
./qtwebkit-darwin-no-qos-classes.patch
|
||||||
];
|
];
|
||||||
|
qttools = [ ./qttools.patch ];
|
||||||
};
|
};
|
||||||
|
|
||||||
mkDerivation =
|
mkDerivation =
|
||||||
|
15
pkgs/development/libraries/qt-5/5.12/qttools.patch
Normal file
15
pkgs/development/libraries/qt-5/5.12/qttools.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
--- 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;
|
@ -1,4 +1,4 @@
|
|||||||
{ qtModule, stdenv, lib, qtbase }:
|
{ qtModule, stdenv, lib, qtbase, qtdeclarative }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
@ -32,5 +32,8 @@ qtModule {
|
|||||||
"bin/macdeployqt"
|
"bin/macdeployqt"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE =
|
||||||
|
lib.optional stdenv.isDarwin ''-DNIXPKGS_QMLIMPORTSCANNER="${qtdeclarative.dev}/bin/qmlimportscanner"'';
|
||||||
|
|
||||||
setupHook = ../hooks/qttools-setup-hook.sh;
|
setupHook = ../hooks/qttools-setup-hook.sh;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user