nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1--- a/src/tools/macdeployqt/shared/shared.cpp
2+++ b/src/tools/macdeployqt/shared/shared.cpp
3@@ -1300,6 +1300,13 @@ bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInf
4 argumentList.append( "-importPath");
5 argumentList.append(qmlImportsPath);
6
7+ // In a modularized installation of qt as we have in Nix, instead, we will
8+ // read the paths from the environment, as they are spread in multiple
9+ // locations and normally set in the environment like this
10+ auto envQmlImportPaths = ::qgetenv("QML2_IMPORT_PATH").split(':');
11+ for (const QString &importPath : envQmlImportPaths)
12+ argumentList << "-importPath" << importPath;
13+
14 // run qmlimportscanner
15 QProcess qmlImportScanner;
16 qmlImportScanner.start(qmlImportScannerPath, argumentList);