lomiri.lomiri-ui-toolkit: Fix compatibility with versioned QML import paths

LUITK uses QML2_IMPORT_PATH for finding themes, both additional ones & the default.
If it can't find its default theme, most LUITK apps are displayed as solid-black.

Fix by adding the new variable to its list of considered envvars.
This commit is contained in:
OPNA2608 2024-01-31 01:02:02 +01:00
parent 386c037cb7
commit 72d9186fcc
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 = ''