Merge pull request #285120 from OPNA2608/fix/lomiri-ui-toolkit-versioned-QML_IMPORTS_PATH

lomiri.lomiri-ui-toolkit: Fix compatibility with versioned QML import paths
This commit is contained in:
Cosima Neidahl 2024-01-31 13:38:54 +01:00 committed by GitHub
commit fbe2d5c285
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,29 @@
From ca4c52a80532732243067eb00ec12b4ef84010a6 Mon Sep 17 00:00:00 2001
From: OPNA2608 <opna2608@protonmail.com>
Date: Tue, 30 Jan 2024 19:46:09 +0100
Subject: [PATCH] Nixpkgs versioned QML path
---
src/LomiriToolkit/uctheme.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/LomiriToolkit/uctheme.cpp b/src/LomiriToolkit/uctheme.cpp
index a10c89344..4b0653589 100644
--- a/src/LomiriToolkit/uctheme.cpp
+++ b/src/LomiriToolkit/uctheme.cpp
@@ -180,6 +180,12 @@ QStringList themeSearchPath()
pathList << QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
}
+ // append versioned QML import path from Nixpkgs
+ const QString nixpkgsQmlImportPath = QString::fromLocal8Bit(getenv("NIXPKGS_QT@qtVersion@_QML_IMPORT_PATH"));
+ if (!nixpkgsQmlImportPath.isEmpty()) {
+ pathList << nixpkgsQmlImportPath.split(':', QString::SkipEmptyParts);
+ }
+
// append QML import path(s); we must explicitly support env override here
const QString qml2ImportPath = QString::fromLocal8Bit(getenv("QML2_IMPORT_PATH"));
if (!qml2ImportPath.isEmpty()) {
--
2.42.0

View File

@ -3,6 +3,7 @@
, fetchFromGitLab
, fetchpatch
, gitUpdater
, substituteAll
, testers
, dbus-test-runner
, dpkg
@ -74,6 +75,11 @@ stdenv.mkDerivation (finalAttrs: {
})
./2001-Mark-problematic-tests.patch
(substituteAll {
src = ./2002-Nixpkgs-versioned-QML-path.patch.in;
name = "2002-Nixpkgs-versioned-QML-path.patch";
qtVersion = lib.versions.major qtbase.version;
})
];
postPatch = ''