lomiri.lomiri-push-qml: 0.4.0 -> 0.4.1, init qt6 variant (#534080)

This commit is contained in:
Cosima Neidahl
2026-07-07 19:03:06 +00:00
committed by GitHub
2 changed files with 22 additions and 10 deletions
+1 -1
View File
@@ -37,6 +37,7 @@ let
withDocumentation = !useQt6;
};
lomiri-notifications = callPackage ./qml/lomiri-notifications { };
lomiri-push-qml = callPackage ./qml/lomiri-push-qml { };
lomiri-ui-extras = callPackage ./qml/lomiri-ui-extras { };
lomiri-ui-toolkit = callPackage ./qml/lomiri-ui-toolkit { };
qqc2-suru-style = callPackage ./qml/qqc2-suru-style { };
@@ -90,7 +91,6 @@ let
u1db-qt = callPackage ./development/u1db-qt { };
#### QML / QML-related
lomiri-push-qml = callPackage ./qml/lomiri-push-qml { };
lomiri-settings-components = callPackage ./qml/lomiri-settings-components { };
#### Services
@@ -11,22 +11,34 @@
qtdeclarative,
}:
let
withQt6 = lib.versions.major qtbase.version == "6";
in
stdenv.mkDerivation (finalAttrs: {
pname = "lomiri-push-qml";
version = "0.4.0";
version = "0.4.1";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lomiri-push-qml";
tag = finalAttrs.version;
hash = "sha256-QpkW/fbl0Px5HsKfz/gv+D1S+iSpMZM8TiZCuAq1myk=";
hash = "sha256-+D8F0H3S+lfU53CJarE7Wrsc66JvJywzih0IgGD8cJo=";
};
postPatch = ''
# Queries QMake for QML install location, returns QtBase build path
substituteInPlace src/*/PushNotifications/CMakeLists.txt \
--replace-fail 'qmake -query QT_INSTALL_QML' 'echo ''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}'
'';
postPatch =
if (!withQt6) then
''
# Queries QMake for QML install location, returns QtBase build path
substituteInPlace src/*/PushNotifications/CMakeLists.txt \
--replace-fail 'qmake -query QT_INSTALL_QML' 'echo ''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}'
''
else
''
substituteInPlace src/Lomiri/PushNotifications/CMakeLists.txt \
--replace-fail \
'set(QT_INSTALL_QML "''${CMAKE_INSTALL_LIBDIR}/qt6/qml/")' \
'set(QT_INSTALL_QML "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}")'
'';
strictDeps = true;
@@ -46,8 +58,8 @@ stdenv.mkDerivation (finalAttrs: {
dontWrapQtApps = true;
cmakeFlags = [
(lib.cmakeBool "ENABLE_QT6" (lib.strings.versionAtLeast qtbase.version "6"))
(lib.cmakeBool "ENABLE_UBUNTU_COMPAT" (!lib.strings.versionAtLeast qtbase.version "6"))
(lib.cmakeBool "ENABLE_QT6" withQt6)
(lib.cmakeBool "ENABLE_UBUNTU_COMPAT" (!withQt6))
];
preBuild = ''