about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/lomiri
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
committerAlyssa Ross <hi@alyssa.is>2024-02-13 12:25:07 +0100
commita5e1520e4538e29ecfbd4b168306f890566d7bfd (patch)
tree28099c268b5d4b1e33c2b29f0714c45f0b961382 /nixpkgs/pkgs/desktops/lomiri
parent822f7c15c04567fbdc27020e862ea2b70cfbf8eb (diff)
parent3560d1c8269d0091b9aae10731b5e85274b7bbc1 (diff)
downloadnixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.gz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.bz2
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.lz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.xz
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.tar.zst
nixlib-a5e1520e4538e29ecfbd4b168306f890566d7bfd.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/desktops/lomiri')
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/data/lomiri-schemas/default.nix11
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/data/lomiri-sounds/default.nix47
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/data/lomiri-wallpapers/default.nix48
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/default.nix7
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/development/deviceinfo/default.nix5
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/development/geonames/default.nix28
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/2001-Remove-custom-check-target.patch37
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/default.nix44
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix31
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/development/qtmir/default.nix160
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/development/trust-store/default.nix20
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix27
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix5
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-extras/default.nix50
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/2002-Nixpkgs-versioned-QML-path.patch.in29
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix29
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix45
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/biometryd/default.nix52
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/content-hub/default.nix25
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/hfd-service/default.nix7
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/history-service/default.nix24
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix51
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix134
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/lomiri-thumbnailer/default.nix212
-rw-r--r--nixpkgs/pkgs/desktops/lomiri/services/telephony-service/default.nix197
25 files changed, 1101 insertions, 224 deletions
diff --git a/nixpkgs/pkgs/desktops/lomiri/data/lomiri-schemas/default.nix b/nixpkgs/pkgs/desktops/lomiri/data/lomiri-schemas/default.nix
index c612011cbfff..4d1caf6eb873 100644
--- a/nixpkgs/pkgs/desktops/lomiri/data/lomiri-schemas/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/data/lomiri-schemas/default.nix
@@ -8,17 +8,18 @@
 , glib
 , intltool
 , pkg-config
+, validatePkgConfig
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "lomiri-schemas";
-  version = "0.1.3";
+  version = "0.1.4";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/lomiri-schemas";
     rev = finalAttrs.version;
-    hash = "sha256-FrDUFqdD0KW2VG2pTA6LMb6/9PdNtQUlYTEo1vnW6QQ=";
+    hash = "sha256-Pnn/Qh5EYEqmP8QFsZcSCpDL36++aeUUok3t9a1/1n0=";
   };
 
   strictDeps = true;
@@ -28,6 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
     glib # glib-compile-schemas
     pkg-config
     intltool
+    validatePkgConfig
   ];
 
   buildInputs = [
@@ -36,8 +38,8 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DGSETTINGS_LOCALINSTALL=ON"
-    "-DGSETTINGS_COMPILE=ON"
+    (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
+    (lib.cmakeBool "GSETTINGS_COMPILE" true)
   ];
 
   passthru = {
@@ -48,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "GSettings / AccountsService schema files for Lomiri";
     homepage = "https://gitlab.com/ubports/development/core/lomiri-schemas";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-schemas/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.lgpl21Plus;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/data/lomiri-sounds/default.nix b/nixpkgs/pkgs/desktops/lomiri/data/lomiri-sounds/default.nix
new file mode 100644
index 000000000000..1b54723b2925
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/data/lomiri-sounds/default.nix
@@ -0,0 +1,47 @@
+{ stdenvNoCC
+, lib
+, fetchFromGitLab
+, gitUpdater
+, testers
+, cmake
+}:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "lomiri-sounds";
+  version = "22.02";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/lomiri-sounds";
+    rev = finalAttrs.version;
+    hash = "sha256-t9JYxrJ5ICslxidHmbD1wa6n7XZMf2a+PgMLcwgsDvU=";
+  };
+
+  postPatch = ''
+    # Doesn't need a compiler, only installs data
+    substituteInPlace CMakeLists.txt \
+      --replace 'project (lomiri-sounds)' 'project (lomiri-sounds LANGUAGES NONE)'
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+  ];
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = gitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "Notification and ringtone sound effects for Lomiri";
+    homepage = "https://gitlab.com/ubports/development/core/lomiri-sounds";
+    license = with licenses; [ cc-by-30 cc0 cc-by-sa-30 cc-by-40 ];
+    maintainers = teams.lomiri.members;
+    platforms = platforms.all;
+    pkgConfigModules = [
+      "lomiri-sounds"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/desktops/lomiri/data/lomiri-wallpapers/default.nix b/nixpkgs/pkgs/desktops/lomiri/data/lomiri-wallpapers/default.nix
new file mode 100644
index 000000000000..9cdb7887ee88
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/data/lomiri-wallpapers/default.nix
@@ -0,0 +1,48 @@
+{ stdenvNoCC
+, lib
+, fetchFromGitLab
+, gitUpdater
+}:
+
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "lomiri-wallpapers";
+  version = "20.04.0";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/lomiri-wallpapers";
+    rev = finalAttrs.version;
+    hash = "sha256-n8+vY+MPVqW6s5kSo4aEtGZv1AsjB3nNEywbmcNWfhI=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share
+
+    # release-specific wallpapers
+    cp -r ${lib.versions.majorMinor finalAttrs.version} $out/share/wallpapers
+    rm $out/share/wallpapers/.placeholder
+
+    # eternal hardwired fallback/default
+    install -Dm644 {.,$out/share/wallpapers}/warty-final-ubuntu.png
+    ln -s warty-final-ubuntu.png $out/share/wallpapers/lomiri-default-background.png
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = gitUpdater { };
+
+  meta = with lib; {
+    description = "Wallpapers for the Lomiri Operating Environment, gathered from people of the Ubuntu Touch / UBports community";
+    homepage = "https://gitlab.com/ubports/development/core/lomiri-wallpapers";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-wallpapers/-/blob/${finalAttrs.version}/ChangeLog";
+    # On update, recheck debian/copyright for which licenses apply to the installed images
+    license = with licenses; [ cc-by-sa-30 ];
+    maintainers = teams.lomiri.members;
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/desktops/lomiri/default.nix b/nixpkgs/pkgs/desktops/lomiri/default.nix
index f1161155ae37..d0d9c777431e 100644
--- a/nixpkgs/pkgs/desktops/lomiri/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/default.nix
@@ -12,6 +12,8 @@ let
 
     #### Data
     lomiri-schemas = callPackage ./data/lomiri-schemas { };
+    lomiri-sounds = callPackage ./data/lomiri-sounds { };
+    lomiri-wallpapers = callPackage ./data/lomiri-wallpapers { };
     suru-icon-theme = callPackage ./data/suru-icon-theme { };
 
     #### Development tools / libraries
@@ -22,6 +24,7 @@ let
     libusermetrics = callPackage ./development/libusermetrics { };
     lomiri-api = callPackage ./development/lomiri-api { };
     lomiri-app-launch = callPackage ./development/lomiri-app-launch { };
+    qtmir = callPackage ./development/qtmir { };
     trust-store = callPackage ./development/trust-store { };
     u1db-qt = callPackage ./development/u1db-qt { };
 
@@ -31,6 +34,7 @@ let
     lomiri-settings-components = callPackage ./qml/lomiri-settings-components { };
     lomiri-ui-extras = callPackage ./qml/lomiri-ui-extras { };
     lomiri-ui-toolkit = callPackage ./qml/lomiri-ui-toolkit { };
+    qqc2-suru-style = callPackage ./qml/qqc2-suru-style { };
 
     #### Services
     biometryd = callPackage ./services/biometryd { };
@@ -38,8 +42,11 @@ let
     hfd-service = callPackage ./services/hfd-service { };
     history-service = callPackage ./services/history-service { };
     lomiri-download-manager = callPackage ./services/lomiri-download-manager { };
+    lomiri-indicator-network = callPackage ./services/lomiri-indicator-network { };
+    lomiri-thumbnailer = callPackage ./services/lomiri-thumbnailer { };
     lomiri-url-dispatcher = callPackage ./services/lomiri-url-dispatcher { };
     mediascanner2 = callPackage ./services/mediascanner2 { };
+    telephony-service = callPackage ./services/telephony-service { };
   };
 in
   lib.makeScope libsForQt5.newScope packages
diff --git a/nixpkgs/pkgs/desktops/lomiri/development/deviceinfo/default.nix b/nixpkgs/pkgs/desktops/lomiri/development/deviceinfo/default.nix
index 00ba1d864bf6..9ddadb83cbec 100644
--- a/nixpkgs/pkgs/desktops/lomiri/development/deviceinfo/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/development/deviceinfo/default.nix
@@ -12,13 +12,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "deviceinfo";
-  version = "0.2.1";
+  version = "0.2.2";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/deviceinfo";
     rev = finalAttrs.version;
-    hash = "sha256-x0Xm4Z3hpvO5p/5JxMRloFqn58cRH2ak8rKtuxmmVVQ=";
+    hash = "sha256-wTl+GgNiWzJxGLdU2iMH94UhQ40gjAPTVErouQIGXOA=";
   };
 
   outputs = [
@@ -57,6 +57,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "Library to detect and configure devices";
     homepage = "https://gitlab.com/ubports/development/core/deviceinfo";
+    changelog = "https://gitlab.com/ubports/development/core/deviceinfo/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.gpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/development/geonames/default.nix b/nixpkgs/pkgs/desktops/lomiri/development/geonames/default.nix
index 8fc5a65b72ff..035837b1c47c 100644
--- a/nixpkgs/pkgs/desktops/lomiri/development/geonames/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/development/geonames/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchFromGitLab
-, fetchpatch
 , gitUpdater
 , testers
 , buildPackages
@@ -17,17 +16,18 @@
 , withDocumentation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
 , gtk-doc
 , pkg-config
+, validatePkgConfig
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "geonames";
-  version = "0.3.0";
+  version = "0.3.1";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/geonames";
     rev = finalAttrs.version;
-    hash = "sha256-Mo7Khj2pgdJ9kT3npFXnh1WTSsY/B1egWTccbAXFNY8=";
+    hash = "sha256-AhRnUoku17kVY0UciHQXFDa6eCH6HQ4ZGIOobCaGTKQ=";
   };
 
   outputs = [
@@ -39,16 +39,6 @@ stdenv.mkDerivation (finalAttrs: {
     "devdoc"
   ];
 
-  patches = [
-    # Improves install locations of demo & docs
-    # Remove when https://gitlab.com/ubports/development/core/geonames/-/merge_requests/3 merged & in release
-    (fetchpatch {
-      name = "0001-geonames-Use-CMAKE_INSTALL_BINDIR-for-install.patch";
-      url = "https://gitlab.com/OPNA2608/geonames/-/commit/3bca6d4d02843aed851a0a7480d5cd5ac02b4cda.patch";
-      hash = "sha256-vwffuMKpIqymYaiGEvnNeVXLmnz5e4aBpg55fnNbjKs=";
-    })
-  ];
-
   postPatch = ''
     patchShebangs src/generate-locales.sh tests/setup-test-env.sh
   '';
@@ -60,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
     gettext
     glib # glib-compile-resources
     pkg-config
+    validatePkgConfig
   ] ++ lib.optionals withDocumentation [
     docbook-xsl-nons
     docbook_xml_dtd_45
@@ -84,14 +75,14 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DWANT_DOC=${lib.boolToString withDocumentation}"
-    "-DWANT_DEMO=${lib.boolToString withExamples}"
-    "-DWANT_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
+    (lib.cmakeBool "WANT_DOC" withDocumentation)
+    (lib.cmakeBool "WANT_DEMO" withExamples)
+    (lib.cmakeBool "WANT_TESTS" finalAttrs.finalPackage.doCheck)
     # Keeps finding & using glib-compile-resources from buildInputs otherwise
-    "-DCMAKE_PROGRAM_PATH=${lib.makeBinPath [ buildPackages.glib.dev ]}"
+    (lib.cmakeFeature "CMAKE_PROGRAM_PATH" (lib.makeBinPath [ buildPackages.glib.dev ]))
   ] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
     # only for cross without native execute support because the canExecute "emulator" call has a format that I can't get CMake to accept
-    "-DCMAKE_CROSSCOMPILING_EMULATOR=${stdenv.hostPlatform.emulator buildPackages}"
+    (lib.cmakeFeature "CMAKE_CROSSCOMPILING_EMULATOR" (stdenv.hostPlatform.emulator buildPackages))
   ];
 
   preInstall = lib.optionalString withDocumentation ''
@@ -109,6 +100,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "Parse and query the geonames database dump";
     homepage = "https://gitlab.com/ubports/development/core/geonames";
+    changelog = "https://gitlab.com/ubports/development/core/geonames/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.gpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.all;
diff --git a/nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/2001-Remove-custom-check-target.patch b/nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/2001-Remove-custom-check-target.patch
new file mode 100644
index 000000000000..dfa90b18ca09
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/2001-Remove-custom-check-target.patch
@@ -0,0 +1,37 @@
+From 52ac1d6548b4a92d569c5d2f53b84c604c7fce8a Mon Sep 17 00:00:00 2001
+From: OPNA2608 <opna2608@protonmail.com>
+Date: Thu, 1 Feb 2024 22:42:39 +0100
+Subject: [PATCH] Remove custom check target
+
+The automatic one provides better controls for us
+---
+ CMakeLists.txt | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index af643a7..75b3cc1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -105,18 +105,13 @@ add_subdirectory("data")
+ 
+ 
+ if(ENABLE_TESTS)
+-enable_testing()
++include(CTest)
+ 
+ pkg_check_modules(QTDBUSTEST REQUIRED libqtdbustest-1 REQUIRED)
+ include_directories(${QTDBUSTEST_INCLUDE_DIRS})
+ 
+ add_subdirectory(tests)
+ 
+-ADD_CUSTOM_TARGET(
+-	check
+-	${CMAKE_CTEST_COMMAND} --force-new-ctest-process --output-on-failure
+-)
+-
+ find_package(CoverageReport)
+ enable_coverage_report(
+   TARGETS
+-- 
+2.42.0
+
diff --git a/nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/default.nix b/nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/default.nix
index 0c4ed003e597..d4767b705825 100644
--- a/nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/development/libusermetrics/default.nix
@@ -19,18 +19,19 @@
 , qtdeclarative
 , qtxmlpatterns
 , ubports-click
+, validatePkgConfig
 , wrapQtAppsHook
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "libusermetrics";
-  version = "1.3.0";
+  version = "1.3.2";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/libusermetrics";
     rev = finalAttrs.version;
-    hash = "sha256-yO9wZcXJBKt1HZ1GKoQ1flqYuwW9PlXiWLE3bl21PSQ=";
+    hash = "sha256-jmJH5vByBnBqgQfyb7HNVe+eS/jHcU64R2dnvuLbqss=";
   };
 
   outputs = [
@@ -39,22 +40,18 @@ stdenv.mkDerivation (finalAttrs: {
     "doc"
   ];
 
-  postPatch = ''
-    substituteInPlace data/CMakeLists.txt \
-      --replace '/etc' "$out/etc"
+  patches = [
+    # Not submitted yet, waiting for decision on how CMake testing should be handled
+    ./2001-Remove-custom-check-target.patch
+  ];
 
+  postPatch = ''
     # Tries to query QMake for QT_INSTALL_QML variable, would return broken paths into /build/qtbase-<commit> even if qmake was available
     substituteInPlace src/modules/UserMetrics/CMakeLists.txt \
-      --replace "\''${QT_IMPORTS_DIR}/UserMetrics" '${placeholder "out"}/${qtbase.qtQmlPrefix}/UserMetrics'
-
-    substituteInPlace src/libusermetricsinput/CMakeLists.txt \
-      --replace 'RUNTIME DESTINATION bin' 'RUNTIME DESTINATION ''${CMAKE_INSTALL_BINDIR}'
+      --replace 'query_qmake(QT_INSTALL_QML QT_IMPORTS_DIR)' 'set(QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}")'
 
     substituteInPlace doc/CMakeLists.txt \
       --replace "\''${CMAKE_INSTALL_DATAROOTDIR}/doc/libusermetrics-doc" "\''${CMAKE_INSTALL_DOCDIR}"
-  '' + lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
-    # Only needed by tests
-    sed -i -e '/QTDBUSTEST/d' CMakeLists.txt
   '';
 
   strictDeps = true;
@@ -64,6 +61,7 @@ stdenv.mkDerivation (finalAttrs: {
     doxygen
     intltool
     pkg-config
+    validatePkgConfig
     wrapQtAppsHook
   ];
 
@@ -91,22 +89,23 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DGSETTINGS_LOCALINSTALL=ON"
-    "-DGSETTINGS_COMPILE=ON"
-    "-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
+    (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
+    (lib.cmakeBool "GSETTINGS_COMPILE" true)
+    (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
+    (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
+      # Exclude tests
+      "-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
+        # Flaky, randomly failing in UserMetricsImplTest.AddTranslatedData (data not ready when signal is emitted?)
+        "^usermetricsoutput-unit-tests"
+      ]})")
+    ]))
   ];
 
   doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
 
-  checkPhase = ''
-    runHook preCheck
-
+  preCheck = ''
     export QT_PLUGIN_PATH=${lib.getBin qtbase}/lib/qt-${qtbase.version}/plugins/
     export QML2_IMPORT_PATH=${lib.getBin qtdeclarative}/lib/qt-${qtbase.version}/qml/
-    dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf -- \
-      make test "''${enableParallelChecking:+-j $NIX_BUILD_CORES}"
-
-    runHook postCheck
   '';
 
   passthru = {
@@ -117,6 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "Enables apps to locally store interesting numerical data for later presentation";
     homepage = "https://gitlab.com/ubports/development/core/libusermetrics";
+    changelog = "https://gitlab.com/ubports/development/core/libusermetrics/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.lgpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix b/nixpkgs/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix
index 92139688b127..381a89fe10ff 100644
--- a/nixpkgs/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/development/lomiri-app-launch/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchFromGitLab
+, fetchpatch
 , gitUpdater
 , testers
 , cmake
@@ -20,6 +21,7 @@
 , python3
 , systemd
 , ubports-click
+, validatePkgConfig
 , zeitgeist
 , withDocumentation ? true
 , doxygen
@@ -29,7 +31,7 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "lomiri-app-launch";
-  version = "0.1.8";
+  version = "0.1.9";
 
   outputs = [
     "out"
@@ -42,15 +44,24 @@ stdenv.mkDerivation (finalAttrs: {
     owner = "ubports";
     repo = "development/core/lomiri-app-launch";
     rev = finalAttrs.version;
-    hash = "sha256-NIBZk5H0bPwAwkI0Qiq2S9dZvchAFPBCHKi2inUVZmI=";
+    hash = "sha256-vuu6tZ5eDJN2rraOpmrDddSl1cIFFBSrILKMJqcUDVc=";
   };
 
+  patches = [
+    # Remove when https://gitlab.com/ubports/development/core/lomiri-app-launch/-/merge_requests/57 merged & in release
+    (fetchpatch {
+      name = "0001-lomiri-app-launch-Fix-typelib-gir-dependency.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-app-launch/-/commit/0419b2592284f43ee5e76060948ea3d5f1c991fd.patch";
+      hash = "sha256-11pEhFi39Cvqb9Hg47kT8+5hq+bz6WmySqaIdwt1MVk=";
+    })
+  ];
+
   postPatch = ''
     patchShebangs tests/{desktop-hook-test.sh.in,repeat-until-pass.sh}
 
     # used pkg_get_variable, cannot replace prefix
     substituteInPlace data/CMakeLists.txt \
-      --replace 'DESTINATION "''${SYSTEMD_USER_UNIT_DIR}"' 'DESTINATION "${placeholder "out"}/lib/systemd/user"'
+      --replace 'pkg_get_variable(SYSTEMD_USER_UNIT_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_UNIT_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/user")'
 
     substituteInPlace tests/jobs-systemd.cpp \
       --replace '^(/usr)?' '^(/nix/store/\\w+-bash-.+)?'
@@ -63,6 +74,7 @@ stdenv.mkDerivation (finalAttrs: {
     dpkg # for setting LOMIRI_APP_LAUNCH_ARCH
     gobject-introspection
     pkg-config
+    validatePkgConfig
   ] ++ lib.optionals withDocumentation [
     doxygen
     python3Packages.breathe
@@ -96,8 +108,16 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DENABLE_MIRCLIENT=OFF"
-    "-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
+    (lib.cmakeBool "ENABLE_MIRCLIENT" false)
+    (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
+    (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
+      # Exclude tests
+      "-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
+        # Flaky, randomly hangs
+        # https://gitlab.com/ubports/development/core/lomiri-app-launch/-/issues/19
+        "^helper-handshake-test"
+      ]})")
+    ]))
   ];
 
   postBuild = lib.optionalString withDocumentation ''
@@ -119,6 +139,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "System and associated utilities to launch applications in a standard and confined way";
     homepage = "https://gitlab.com/ubports/development/core/lomiri-app-launch";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-app-launch/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.gpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/development/qtmir/default.nix b/nixpkgs/pkgs/desktops/lomiri/development/qtmir/default.nix
new file mode 100644
index 000000000000..ba49507f3d36
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/development/qtmir/default.nix
@@ -0,0 +1,160 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, testers
+, cmake
+, cmake-extras
+, pkg-config
+, wrapQtAppsHook
+, gsettings-qt
+, gtest
+, libqtdbustest
+, libqtdbusmock
+, libuuid
+, lomiri-api
+, lomiri-app-launch
+, lomiri-url-dispatcher
+, lttng-ust
+, mir
+, process-cpp
+, qtbase
+, qtdeclarative
+, qtsensors
+, valgrind
+, protobuf
+, glm
+, boost
+, properties-cpp
+, glib
+, validatePkgConfig
+, wayland
+, xwayland
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  # Not regular qtmir, experimental support for Mir 2.x
+  # Currently following https://gitlab.com/ubports/development/core/qtmir/-/tree/personal/mariogrip/desktop-development
+  pname = "qtmir-mir2";
+  version = "0.7.2-unstable-2024-01-08";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/qtmir";
+    rev = "ae0d87415d5c9ed2c4fd2284ba0807d23d564bb0";
+    hash = "sha256-fE8ttCC0FNavs91pASGGG7k7nKVg2lD3JK0WTmCA3gM=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+  ];
+
+  patches = [
+    # Mir 2.15 compatibility patch
+    # Remove when https://gitlab.com/ubports/development/core/qtmir/-/merge_requests/70 merged into branch
+    (fetchpatch {
+      name = "0001-qtmir-Update-for-Mir-2.15-removals.patch";
+      url = "https://gitlab.com/ubports/development/core/qtmir/-/commit/ead5cacd4d69094ab956627f4dd94ecaff1fd69e.patch";
+      hash = "sha256-hUUUnYwhNH3gm76J21M8gA5okaRd/Go03ZFJ4qn0JUo=";
+    })
+
+    # Remove when https://gitlab.com/ubports/development/core/qtmir/-/merge_requests/72 merged in branch
+    (fetchpatch {
+      name = "0002-qtmir-Add-more-better-GNUInstallDirs-variables-usage.patch";
+      url = "https://gitlab.com/ubports/development/core/qtmir/-/commit/87e2cd31052ce15e9625c1327807a320ee5d12af.patch";
+      hash = "sha256-MTE9tHw+xJhraEO1up7dLg0UIcmfHXgWOeuyYrVu2wc=";
+    })
+
+    # Remove when https://gitlab.com/ubports/development/core/qtmir/-/merge_requests/73 merged in branch
+    (fetchpatch {
+      name = "0003-qtmir-CMakeLists-Only-require-test-dependencies-when-building-tests.patch";
+      url = "https://gitlab.com/ubports/development/core/qtmir/-/commit/b7144e67bcbb4cfbd2283d5d05146fb22b7d8cd4.patch";
+      hash = "sha256-Afbj40MopztchDnk6fphTYk86YrQkiK8L1e/oXiL1Mw=";
+    })
+
+    # Remove when https://gitlab.com/ubports/development/core/qtmir/-/merge_requests/74 merged in branch
+    (fetchpatch {
+      name = "0004-qtmir-CMakeLists-Drop-call-of-Qt-internal-macro.patch";
+      url = "https://gitlab.com/ubports/development/core/qtmir/-/commit/8f9c599a4dbc4cf35e289157fd0c82df55b9f8d9.patch";
+      hash = "sha256-SMAErXnlMtVleWRPgO4xuUI7gAAy6W18LxtgXgetRA4=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace "\''${CMAKE_INSTALL_FULL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}" \
+      --replace "\''${CMAKE_INSTALL_FULL_LIBDIR}/qt5/plugins/platforms" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtPluginPrefix}/platforms" \
+
+    substituteInPlace data/xwayland.qtmir.desktop \
+      --replace '/usr/bin/Xwayland' 'Xwayland'
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    glib # glib-compile-schemas
+    pkg-config
+    validatePkgConfig
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    cmake-extras
+    boost
+    gsettings-qt
+    libuuid
+    lomiri-api
+    lomiri-app-launch
+    lomiri-url-dispatcher
+    lttng-ust
+    mir
+    process-cpp
+    protobuf
+    qtbase
+    qtdeclarative
+    qtsensors
+    valgrind
+
+    glm # included by mir header
+    wayland # mirwayland asks for this
+    properties-cpp # included by l-a-l header
+  ];
+
+  propagatedBuildInputs = [
+    # Needs Xwayland on PATH for desktop file, else launching X11 applications crashes qtmir
+    xwayland
+  ];
+
+  checkInputs = [
+    gtest
+    libqtdbustest
+    libqtdbusmock
+  ];
+
+  cmakeFlags = [
+    (lib.cmakeBool "NO_TESTS" (!finalAttrs.finalPackage.doCheck))
+    (lib.cmakeBool "WITH_MIR2" true)
+  ];
+
+  postInstall = ''
+    glib-compile-schemas $out/share/glib-2.0/schemas
+  '';
+
+  # Tests currently unavailable when building with Mir2
+  doCheck = false;
+
+  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+
+  meta = with lib; {
+    description = "QPA plugin to make Qt a Mir server";
+    homepage = "https://gitlab.com/ubports/development/core/qtmir";
+    license = licenses.lgpl3Only;
+    maintainers = teams.lomiri.members;
+    platforms = platforms.linux;
+    pkgConfigModules = [
+      "qtmirserver"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/desktops/lomiri/development/trust-store/default.nix b/nixpkgs/pkgs/desktops/lomiri/development/trust-store/default.nix
index 477cdd0511f8..d797fbd8f688 100644
--- a/nixpkgs/pkgs/desktops/lomiri/development/trust-store/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/development/trust-store/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchFromGitLab
+, gitUpdater
 , testers
 , boost
 , cmake
@@ -19,17 +20,18 @@
 , properties-cpp
 , qtbase
 , qtdeclarative
+, validatePkgConfig
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "trust-store";
-  version = "unstable-2023-10-17";
+  version = "2.0.2";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/trust-store";
-    rev = "7aa7ab5b7f3843e24c13ae6d9b8607455296d60e";
-    hash = "sha256-j+4FZzbG3qh1pGRapFuuMiwT4Lv9P6Ji9/3Z0uGvXmw=";
+    rev = finalAttrs.version;
+    hash = "sha256-tVwqBu4py8kdydyKECZfLvcLijpZSQszeo8ytTDagy0=";
   };
 
   outputs = [
@@ -58,6 +60,7 @@ stdenv.mkDerivation (finalAttrs: {
     gettext
     graphviz
     pkg-config
+    validatePkgConfig
   ];
 
   buildInputs = [
@@ -86,8 +89,10 @@ stdenv.mkDerivation (finalAttrs: {
   cmakeFlags = [
     # Requires mirclient API, unavailable in Mir 2.x
     # https://gitlab.com/ubports/development/core/trust-store/-/issues/2
-    "-DTRUST_STORE_MIR_AGENT_ENABLED=OFF"
-    "-DTRUST_STORE_ENABLE_DOC_GENERATION=ON"
+    (lib.cmakeBool "TRUST_STORE_MIR_AGENT_ENABLED" false)
+    (lib.cmakeBool "TRUST_STORE_ENABLE_DOC_GENERATION" true)
+    # error: moving a temporary object prevents copy elision
+    (lib.cmakeBool "ENABLE_WERROR" false)
   ];
 
   # Not working
@@ -104,7 +109,10 @@ stdenv.mkDerivation (finalAttrs: {
   # Starts & talks to DBus
   enableParallelChecking = false;
 
-  passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = gitUpdater { };
+  };
 
   meta = with lib; {
     description = "Common implementation of a trust store to be used by trusted helpers";
diff --git a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix
index 34a8f8740ac0..d3d23c68f8bf 100644
--- a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-action-api/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchFromGitLab
-, fetchpatch
 , gitUpdater
 , testers
 , cmake
@@ -10,17 +9,18 @@
 , pkg-config
 , qtbase
 , qtdeclarative
+, validatePkgConfig
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "lomiri-action-api";
-  version = "1.1.2";
+  version = "1.1.3";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/lomiri-action-api";
     rev = finalAttrs.version;
-    hash = "sha256-FOHjZ5F4IkjSn/SpZEz25CbTR/gaK4D7BRxDVSDuAl8=";
+    hash = "sha256-JDcUq7qEp6Z8TjdNspIz4FE/euH+ytGWa4rSxy4voiU=";
   };
 
   outputs = [
@@ -28,19 +28,10 @@ stdenv.mkDerivation (finalAttrs: {
     "dev"
   ];
 
-  patches = [
-    # Drop deprecated qt5_use_modules usage
-    # Remove when https://gitlab.com/ubports/development/core/lomiri-action-api/-/merge_requests/4 merged & in release
-    (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/lomiri-action-api/-/commit/ff1d7f7eb127f6a00a99e8b278c963899d0303f0.patch";
-      hash = "sha256-nLUoRl260hMbtEPjOQJI/3w54xgFxjcxerAqNN5FU/0=";
-    })
-  ];
-
   postPatch = ''
     # Queries QMake for broken Qt variable: '/build/qtbase-<commit>/$(out)/$(qtQmlPrefix)'
     substituteInPlace qml/Lomiri/Action/CMakeLists.txt \
-      --replace "\''${QT_IMPORTS_DIR}/Lomiri" '${qtbase.qtQmlPrefix}/Lomiri'
+      --replace 'exec_program(''${QMAKE_EXECUTABLE} ARGS "-query QT_INSTALL_QML" OUTPUT_VARIABLE QT_IMPORTS_DIR)' 'set(QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}")'
   '';
 
   strictDeps = true;
@@ -48,6 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
   nativeBuildInputs = [
     cmake
     pkg-config
+    validatePkgConfig
   ];
 
   buildInputs = [
@@ -61,9 +53,11 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DENABLE_TESTING=${lib.boolToString finalAttrs.finalPackage.doCheck}"
-    "-Duse_libhud2=OFF" # Use vendored libhud2, TODO package libhud2 separately?
-    "-DGENERATE_DOCUMENTATION=OFF" # QML docs need qdoc, https://github.com/NixOS/nixpkgs/pull/245379
+    (lib.cmakeBool "ENABLE_TESTING" finalAttrs.finalPackage.doCheck)
+    # Use vendored libhud2, TODO package libhud2 separately?
+    (lib.cmakeBool "use_libhud2" false)
+    # QML docs need qdoc, https://github.com/NixOS/nixpkgs/pull/245379
+    (lib.cmakeBool "GENERATE_DOCUMENTATION" false)
   ];
 
   dontWrapQtApps = true;
@@ -83,6 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "Allow applications to export actions in various forms to the Lomiri Shell";
     homepage = "https://gitlab.com/ubports/development/core/lomiri-action-api";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-action-api/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.lgpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix
index 1adb7372b7f9..854615512d67 100644
--- a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-settings-components/default.nix
@@ -12,13 +12,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "lomiri-settings-components";
-  version = "1.1.0";
+  version = "1.1.1";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/lomiri-settings-components";
     rev = finalAttrs.version;
-    hash = "sha256-13uxUBM+uOmt8X0uLGWNP8YbwCdb2QCChB8IP3td5a4=";
+    hash = "sha256-2Wyh+2AW6EeKRv26D4l+GIoH5sWC9SmOODNHOveFZPg=";
   };
 
   postPatch = ''
@@ -58,6 +58,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "QML settings components for the Lomiri Desktop Environment";
     homepage = "https://gitlab.com/ubports/development/core/lomiri-settings-components";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-settings-components/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.lgpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-extras/default.nix b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-extras/default.nix
index 06d5c1c31941..5a2097f47657 100644
--- a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-extras/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-extras/default.nix
@@ -1,7 +1,6 @@
 { stdenv
 , lib
 , fetchFromGitLab
-, fetchpatch
 , gitUpdater
 , cmake
 , cmake-extras
@@ -17,48 +16,18 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "lomiri-ui-extras";
-  version = "0.6.2";
+  version = "0.6.3";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/lomiri-ui-extras";
     rev = finalAttrs.version;
-    hash = "sha256-RZTGTe18ebqKz8kWOpRgFJO2sR97sVbdPQMW/XLHs68=";
+    hash = "sha256-SF/UF84K9kNtLHO9FDuIFdQId0NfbmRiRZiPrOKvE9o=";
   };
 
-  patches = [
-    # Fix compatibility with Exiv2 0.28.0
-    # Remove when version > 0.6.2
-    (fetchpatch {
-      name = "0001-lomiri-ui-extras-Fix-for-exiv2-0.28.0.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-ui-extras/-/commit/f337ceefa7c4f8f39dc7c75d51df8b86f148891a.patch";
-      hash = "sha256-dm50un46eTeBZsyHJF1npGBqOAF1BopJZ1Uln1PqSOE=";
-    })
-
-    # Remove deprecated qt5_use_modules usage
-    # Remove when version > 0.6.2
-    (fetchpatch {
-      name = "0002-lomiri-ui-extras-Stop-using-qt5_use_modules.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-ui-extras/-/commit/df506e7ebe7107dd0465d7d65727753f07abd122.patch";
-      hash = "sha256-VmOhJaUgjp9BHoYAO780uxI5tE7F0Gtp9gRNe0QCrhs=";
-    })
-
-    # Find qmltestrunner via PATH instead of hardcoded path
-    # https://gitlab.com/ubports/development/core/lomiri-ui-extras/-/merge_requests/84
-    (fetchpatch {
-      name = "0003-lomiri-ui-extras-Dont-insist-on-finding-qmltestrunner-only-at-hardcoded-guess.patch";
-      url = "https://gitlab.com/OPNA2608/lomiri-ui-extras/-/commit/b0c4901818761b516a45b7f0524ac713ddf33cfe.patch";
-      hash = "sha256-oFeaGiYEDr9XHRlCpXX+0ALlVdfb0FmGBFF1RzIXSBE=";
-    })
-  ];
-
   postPatch = ''
     substituteInPlace modules/Lomiri/Components/Extras{,/{plugin,PamAuthentication}}/CMakeLists.txt \
       --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
-
-    # tst_busy_indicator runs into a codepath in lomiri-ui-toolkit that expects a working GL context
-    sed -i tests/qml/CMakeLists.txt \
-      -e '/declare_qml_test("tst_busy_indicator"/d'
   '';
 
   strictDeps = true;
@@ -89,11 +58,19 @@ stdenv.mkDerivation (finalAttrs: {
   dontWrapQtApps = true;
 
   cmakeFlags = [
-    "-DENABLE_TESTS=${lib.boolToString finalAttrs.finalPackage.doCheck}"
+    (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck)
+    (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
+      # Exclude tests
+      "-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
+        # tst_busy_indicator runs into a codepath in lomiri-ui-toolkit that expects a working GL context
+        "^tst_busy_indicator"
+        # Photo & PhotoImageProvider Randomly fail, unsure why
+        "^tst_PhotoEditorPhoto"
+      ]})")
+    ]))
   ];
 
-  # tst_PhotoEditorPhoto and tst_PhotoEditorPhotoImageProvider randomly fail, haven't had time to debug
-  doCheck = false;
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
 
   # Parallelism breaks xvfb-run-launched script for QML tests
   enableParallelChecking = false;
@@ -118,6 +95,7 @@ stdenv.mkDerivation (finalAttrs: {
       documentation and/or lack of automated tests.
     '';
     homepage = "https://gitlab.com/ubports/development/core/lomiri-ui-extras";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-ui-extras/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.gpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/2002-Nixpkgs-versioned-QML-path.patch.in b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/2002-Nixpkgs-versioned-QML-path.patch.in
new file mode 100644
index 000000000000..d2e83baf98ae
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/2002-Nixpkgs-versioned-QML-path.patch.in
@@ -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
+
diff --git a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix
index bac495acdc7c..f8048b49eb5c 100644
--- a/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/qml/lomiri-ui-toolkit/default.nix
@@ -3,6 +3,7 @@
 , fetchFromGitLab
 , fetchpatch
 , gitUpdater
+, substituteAll
 , testers
 , dbus-test-runner
 , dpkg
@@ -22,6 +23,7 @@
 , qtsvg
 , qtsystems
 , suru-icon-theme
+, validatePkgConfig
 , wrapQtAppsHook
 , xvfb-run
 }:
@@ -33,13 +35,13 @@ let
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "lomiri-ui-toolkit";
-  version = "1.3.5011";
+  version = "1.3.5012";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/lomiri-ui-toolkit";
     rev = finalAttrs.version;
-    hash = "sha256-z/EEmC9LjQtBx5MRDLeImxpRrzH4w6v6o+NmqX+L4dw=";
+    hash = "sha256-Azz2IOm/7XRvDbyIKaYxrkR47evSB17ejtssuEJayPc=";
   };
 
   outputs = [ "out" "dev" ];
@@ -57,23 +59,12 @@ stdenv.mkDerivation (finalAttrs: {
       hash = "sha256-x8Zk7+VBSlM16a3V1yxJqIB63796H0lsS+F4dvR/z80=";
     })
 
-    # Small fixes to statesaver & tst_imageprovider.11.qml tests
-    # Remove when version > 1.3.5011
-    (fetchpatch {
-      name = "0003-lomiri-ui-toolkit-tests-Minor-fixes.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/commit/a8324d670b813a48ac7d48aa0bc013773047a01d.patch";
-      hash = "sha256-W6q3LuQqWmUVSBzORcJsTPoLfbWwytABMDR6JITHrDI=";
-    })
-
-    # Fix Qt 5.15.11 compatibility
-    # Remove when version > 1.3.5011
-    (fetchpatch {
-      name = "0004-lomiri-ui-toolkit-Fix-compilation-with-Qt-5.15.11.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/commit/4f999077dc6bc5591bdfede64fd21cb3acdcaac1.patch";
-      hash = "sha256-5VCQFOykxgspNBxH94XYuBpdHsH9a3+8FwV6xQE55Xc=";
-    })
-
     ./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 = ''
@@ -130,6 +121,7 @@ stdenv.mkDerivation (finalAttrs: {
     pkg-config
     python3
     qmake
+    validatePkgConfig
     wrapQtAppsHook
   ];
 
@@ -242,6 +234,7 @@ stdenv.mkDerivation (finalAttrs: {
         - localisation through gettext
     '';
     homepage = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-ui-toolkit/-/blob/${finalAttrs.version}/ChangeLog";
     license = with licenses; [ gpl3Only cc-by-sa-30 ];
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix b/nixpkgs/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix
new file mode 100644
index 000000000000..5717ae35f113
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/qml/qqc2-suru-style/default.nix
@@ -0,0 +1,45 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, gitUpdater
+, qmake
+, qtdeclarative
+, qtquickcontrols2
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "qqc2-suru-style";
+  version = "0.20230206";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/qqc2-suru-style";
+    rev = finalAttrs.version;
+    hash = "sha256-ZLPuXnhlR1IDhGnprcdWHLnOeS6ZzVkFhQML0iKMjO8=";
+  };
+
+  # QMake can't find Qt modules from buildInputs
+  strictDeps = false;
+
+  nativeBuildInputs = [
+    qmake
+  ];
+
+  buildInputs = [
+    qtdeclarative
+    qtquickcontrols2
+  ];
+
+  dontWrapQtApps = true;
+
+  passthru.updateScript = gitUpdater { };
+
+  meta = with lib; {
+    description = "Suru Style for QtQuick Controls 2";
+    homepage = "https://gitlab.com/ubports/development/core/qqc2-suru-style";
+    changelog = "https://gitlab.com/ubports/development/core/qqc2-suru-style/-/blob/${finalAttrs.version}/ChangeLog";
+    license = with licenses; [ gpl2Plus lgpl3Only cc-by-sa-30 ];
+    maintainers = teams.lomiri.members;
+    platforms = platforms.unix;
+  };
+})
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/biometryd/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/biometryd/default.nix
index c8d0da9a65c2..418a39ebb6e0 100644
--- a/nixpkgs/pkgs/desktops/lomiri/services/biometryd/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/services/biometryd/default.nix
@@ -18,17 +18,18 @@
 , qtbase
 , qtdeclarative
 , sqlite
+, validatePkgConfig
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "biometryd";
-  version = "0.3.0";
+  version = "0.3.1";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/biometryd";
     rev = finalAttrs.version;
-    hash = "sha256-b095rsQnd63Ziqe+rn3ROo4LGXZxZ3Sa6h3apzCuyCs=";
+    hash = "sha256-derU7pKdNf6pwhskaW7gCLcU9ixBG3U0EI/qtANmmTs=";
   };
 
   outputs = [
@@ -36,41 +37,10 @@ stdenv.mkDerivation (finalAttrs: {
     "dev"
   ];
 
-  patches = [
-    # https://gitlab.com/ubports/development/core/biometryd/-/merge_requests/31
-    (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/biometryd/-/commit/d01d979e4f98c6473761d1ace308aa182017804e.patch";
-      hash = "sha256-JxL3BLuh33ptfneU1y2qNGFKpeMlZlTMwCK97Rk3aTA=";
-    })
-    (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/biometryd/-/commit/3cec6a3d42ea6aba8892da2c771b317f44daf9e2.patch";
-      hash = "sha256-Ij/aio38WmZ+NsUSbM195Gwb83goWIcCnJvGwAOJi50=";
-    })
-    (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/biometryd/-/commit/e89bd9444bc1cfe84a9aa93faa23057c80f39564.patch";
-      hash = "sha256-1vEG349X9+SvY/f3no/l5cMVGpdzC8h/8XOZwL/70Dc=";
-    })
-
-    # https://gitlab.com/ubports/development/core/biometryd/-/merge_requests/32
-    (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/biometryd/-/commit/9e52fad0139c5a45f69e6a6256b2b5ff54f77740.patch";
-      hash = "sha256-DZSdzKq6EYgAllKSDgkGk2g57zHN+gI5fOoj7U5AcKY=";
-    })
-  ];
-
   postPatch = ''
-    # Remove with !31 patches, fetchpatch can't apply renames
-    pushd data
-    for type in conf service; do
-      mv biometryd.$type biometryd.$type.in
-      substituteInPlace biometryd.$type.in \
-        --replace '/usr/bin' "\''${CMAKE_INSTALL_FULL_BINDIR}"
-    done
-    popd
-
     # Uses pkg_get_variable, cannot substitute prefix with that
-    substituteInPlace CMakeLists.txt \
-      --replace 'pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)' 'set(SYSTEMD_SYSTEM_UNIT_DIR "${placeholder "out"}/lib/systemd/system")'
+    substituteInPlace data/CMakeLists.txt \
+      --replace 'pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)' 'set(SYSTEMD_SYSTEM_UNIT_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/system")'
 
     substituteInPlace src/biometry/qml/Biometryd/CMakeLists.txt \
       --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
@@ -84,6 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
     cmake
     pkg-config
     qtdeclarative # qmlplugindump
+    validatePkgConfig
   ];
 
   buildInputs = [
@@ -107,8 +78,9 @@ stdenv.mkDerivation (finalAttrs: {
   dontWrapQtApps = true;
 
   cmakeFlags = [
-    "-DENABLE_WERROR=OFF"
-    "-DWITH_HYBRIS=OFF"
+    # maybe-uninitialized warnings
+    (lib.cmakeBool "ENABLE_WERROR" false)
+    (lib.cmakeBool "WITH_HYBRIS" false)
   ];
 
   preBuild = ''
@@ -118,6 +90,11 @@ stdenv.mkDerivation (finalAttrs: {
 
   doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
 
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = gitUpdater { };
+  };
+
   meta = with lib; {
     description = "Mediates/multiplexes access to biometric devices";
     longDescription = ''
@@ -126,6 +103,7 @@ stdenv.mkDerivation (finalAttrs: {
       them for identification and verification of users.
     '';
     homepage = "https://gitlab.com/ubports/development/core/biometryd";
+    changelog = "https://gitlab.com/ubports/development/core/biometryd/-/${finalAttrs.version}/ChangeLog";
     license = licenses.lgpl3Only;
     maintainers = teams.lomiri.members;
     mainProgram = "biometryd";
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/content-hub/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/content-hub/default.nix
index 6fb05b445ed8..17120d5370f5 100644
--- a/nixpkgs/pkgs/desktops/lomiri/services/content-hub/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/services/content-hub/default.nix
@@ -24,19 +24,20 @@
 , qtdeclarative
 , qtfeedback
 , qtgraphicaleffects
+, validatePkgConfig
 , wrapGAppsHook
 , xvfb-run
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "content-hub";
-  version = "1.1.0";
+  version = "1.1.1";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/content-hub";
     rev = finalAttrs.version;
-    hash = "sha256-IntEpgPCBmOL6K6TU+UhgGb6OHVA9pYurK5VN3woIIw=";
+    hash = "sha256-sQeyJV+Wc6PHKGIefl/dfU06XqTdICsn+Xamjx3puiI=";
   };
 
   outputs = [
@@ -67,19 +68,31 @@ stdenv.mkDerivation (finalAttrs: {
       url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/3c5ca4a8ec125e003aca78c14521b70140856c25.patch";
       hash = "sha256-kYN0eLwMyM/9yK+zboyEsoPKZMZ4SCXodVYsvkQr2F8=";
     })
+
+    # Remove when https://gitlab.com/ubports/development/core/content-hub/-/merge_requests/37 merged & in release
+    (fetchpatch {
+      name = "0004-content-hub-Fix-generation-of-transfer_files.patch";
+      url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/7ab3a4421356f83515f0deffb5f97a5b38601c13.patch";
+      hash = "sha256-MJZm3ny5t0/GX0bd5hGQbPM2k7M4KUvKqce/0cYYgvM=";
+    })
+    (fetchpatch {
+      name = "0005-content-hub-Fix-generation-of-moc_test_harness.patch";
+      url = "https://gitlab.com/ubports/development/core/content-hub/-/commit/6e30f4f10ef90e817ca01d32959b6c782de48955.patch";
+      hash = "sha256-TAbYn265RpHpulaRVaHy9XqNF+qoDE7YQIfFMPfqEhw=";
+    })
   ];
 
   postPatch = ''
     substituteInPlace import/*/Content/CMakeLists.txt \
-      --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
+      --replace-fail "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
 
     # Look for peer files in running system
     substituteInPlace src/com/lomiri/content/service/registry-updater.cpp \
-      --replace '/usr' '/run/current-system/sw'
+      --replace-fail '/usr' '/run/current-system/sw'
 
     # Don't override default theme search path (which honours XDG_DATA_DIRS) with a FHS assumption
     substituteInPlace import/Lomiri/Content/contenthubplugin.cpp \
-      --replace 'QIcon::setThemeSearchPaths(QStringList() << ("/usr/share/icons/"));' ""
+      --replace-fail 'QIcon::setThemeSearchPaths(QStringList() << ("/usr/share/icons/"));' ""
   '';
 
   strictDeps = true;
@@ -89,6 +102,7 @@ stdenv.mkDerivation (finalAttrs: {
     gettext
     pkg-config
     qtdeclarative # qmlplugindump
+    validatePkgConfig
     wrapGAppsHook
   ];
 
@@ -167,6 +181,7 @@ stdenv.mkDerivation (finalAttrs: {
       even if they are not running at the same time.
     '';
     homepage = "https://gitlab.com/ubports/development/core/content-hub";
+    changelog = "https://gitlab.com/ubports/development/core/content-hub/-/blob/${finalAttrs.version}/ChangeLog";
     license = with licenses; [ gpl3Only lgpl3Only ];
     mainProgram = "content-hub-service";
     maintainers = teams.lomiri.members;
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/hfd-service/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/hfd-service/default.nix
index e9ae4a0fe2db..cdffee5edaef 100644
--- a/nixpkgs/pkgs/desktops/lomiri/services/hfd-service/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/services/hfd-service/default.nix
@@ -16,13 +16,13 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "hfd-service";
-  version = "0.2.1";
+  version = "0.2.2";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/hfd-service";
     rev = finalAttrs.version;
-    hash = "sha256-KcHwLTSdo86YCteUsPndoxmLf23SOEhROc5cJQ8GS1Q=";
+    hash = "sha256-OpT1vNjnyq66v54EoGOZOUb4HECD4WRJRh9hYMB0GI0=";
   };
 
   postPatch = ''
@@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DENABLE_LIBHYBRIS=OFF"
+    (lib.cmakeBool "ENABLE_LIBHYBRIS" false)
   ];
 
   dontWrapQtApps = true;
@@ -69,6 +69,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "DBus-activated service that manages human feedback devices such as LEDs and vibrators on mobile devices";
     homepage = "https://gitlab.com/ubports/development/core/hfd-service";
+    changelog = "https://gitlab.com/ubports/development/core/hfd-service/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.lgpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/history-service/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/history-service/default.nix
index de8b614ae3ea..86866db3ce92 100644
--- a/nixpkgs/pkgs/desktops/lomiri/services/history-service/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/services/history-service/default.nix
@@ -19,6 +19,7 @@
 , sqlite
 , telepathy
 , telepathy-mission-control
+, validatePkgConfig
 , wrapQtAppsHook
 , xvfb-run
 }:
@@ -28,13 +29,13 @@ let
 in
 stdenv.mkDerivation (finalAttrs: {
   pname = "history-service";
-  version = "0.4";
+  version = "0.5";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/history-service";
     rev = finalAttrs.version;
-    hash = "sha256-oCX+moGQewzstbpddEYYp1kQdO2mVXpWJITfvzDzQDI=";
+    hash = "sha256-m/ytJoHxW0q1vlVKK6Z9ovHzjoiS1AodCSGHTeKygfQ=";
   };
 
   outputs = [
@@ -43,38 +44,31 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   patches = [
-    # Deprecation warnings with Qt5.15, allow disabling -Werror
-    # Remove when version > 0.4
-    (fetchpatch {
-      url = "https://gitlab.com/ubports/development/core/history-service/-/commit/1370777952c6a2efb85f582ff8ba085c2c0e290a.patch";
-      hash = "sha256-Z/dFrFo7WoPZlKto6wNGeWdopsi8iBjmd5ycbqMKgxo=";
-    })
-
     # Drop deprecated qt5_use_modules usage
     # Remove when https://gitlab.com/ubports/development/core/history-service/-/merge_requests/36 merged & in release
     (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/history-service/-/commit/b36ab377aca93555b29d1471d6eaa706b5c843ca.patch";
+      url = "https://gitlab.com/ubports/development/core/history-service/-/commit/b36ab377aca93555b29d1471d6eaa706b5c843ca.patch";
       hash = "sha256-mOpXqqd4JI7lHtcWDm9LGCrtB8ERge04jMpHIagDM2k=";
     })
 
     # Add more / correct existing GNUInstallDirs usage
     # Remove when https://gitlab.com/ubports/development/core/history-service/-/merge_requests/37 merged & in release
     (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/history-service/-/commit/bb4dbdd16e80dcd286d8edfb86b08f0b61bc7fec.patch";
+      url = "https://gitlab.com/ubports/development/core/history-service/-/commit/bb4dbdd16e80dcd286d8edfb86b08f0b61bc7fec.patch";
       hash = "sha256-C/XaygI663yaU06klQD9g0NnbqYxHSmzdbrRxcfiJkk=";
     })
 
     # Correct version information
     # Remove when https://gitlab.com/ubports/development/core/history-service/-/merge_requests/38 merged & in release
     (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/history-service/-/commit/30d9fbee203205ec1ea8fd19c9b6eb54c080a9e2.patch";
-      hash = "sha256-vSZ1ii5Yhw7pB+Pd1pjWnW7JsQxKnn+LeuBKo6qZjQs=";
+      url = "https://gitlab.com/ubports/development/core/history-service/-/commit/98458126f9f494b124134fb35c198af0545f6a98.patch";
+      hash = "sha256-4EfLsaueKTCovl8EilN30cmfNfg19wvyCsbKqOrXtuw=";
     })
 
     # Make tests optional
     # Remove when https://gitlab.com/ubports/development/core/history-service/-/merge_requests/39 merged & in release
     (fetchpatch {
-      url = "https://gitlab.com/OPNA2608/history-service/-/commit/cb5c80cffc35611657244e15a7eb10edcd598ccd.patch";
+      url = "https://gitlab.com/ubports/development/core/history-service/-/commit/cb5c80cffc35611657244e15a7eb10edcd598ccd.patch";
       hash = "sha256-MFHGu4OMScdThq9htUgFMpezP7Ym6YTIZUHWol20wqw=";
     })
   ];
@@ -131,6 +125,7 @@ stdenv.mkDerivation (finalAttrs: {
     cmake
     pkg-config
     sqlite
+    validatePkgConfig
     wrapQtAppsHook
   ];
 
@@ -193,6 +188,7 @@ stdenv.mkDerivation (finalAttrs: {
       Database location: ~/.local/share/history-service/history.sqlite
     '';
     homepage = "https://gitlab.com/ubports/development/core/history-service";
+    changelog = "https://gitlab.com/ubports/development/core/history-service/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.gpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix
index ea2032c7fffa..5c2f02b596fb 100644
--- a/nixpkgs/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix
+++ b/nixpkgs/pkgs/desktops/lomiri/services/lomiri-download-manager/default.nix
@@ -9,7 +9,8 @@
 , cmake-extras
 , dbus
 , dbus-test-runner
-, withDocumentation ? true
+# Needs qdoc, https://github.com/NixOS/nixpkgs/pull/245379
+, withDocumentation ? false
 , doxygen
 , glog
 , graphviz
@@ -19,19 +20,20 @@
 , python3
 , qtbase
 , qtdeclarative
+, validatePkgConfig
 , wrapQtAppsHook
 , xvfb-run
 }:
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "lomiri-download-manager";
-  version = "0.1.2";
+  version = "0.1.3";
 
   src = fetchFromGitLab {
     owner = "ubports";
     repo = "development/core/lomiri-download-manager";
     rev = finalAttrs.version;
-    hash = "sha256-a9C+hactBMHMr31E+ImKDPgpzxajy1klkjDcSEkPHqI=";
+    hash = "sha256-LhhO/zZ4wNiRd235NB2b08SQcCZt1awN/flcsLs2m8U=";
   };
 
   outputs = [
@@ -42,42 +44,17 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   patches = [
-    # Remove when version > 0.1.2
+    # This change seems incomplete, potentially breaks things on systems that don't use AppArmor mediation
+    # https://gitlab.com/ubports/development/core/lomiri-download-manager/-/merge_requests/24#note_1746801673
     (fetchpatch {
-      name = "0001-lomiri-download-manager-Make-documentation-build-optional.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/commit/32d7369714c01bd425af9c6de5bdc04399a12e0a.patch";
-      hash = "sha256-UztcBAAFXDX2j0X5D3kMp9q0vFm3/PblUAKPJ5nZyiY=";
-    })
-
-    # Remove when version > 0.1.2
-    (fetchpatch {
-      name = "0002-lomiri-download-manager-Upgrade-C++-standard-to-C++17.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/commit/a6bc7ae80f2ff4c4743978c6c694149707d9d2e2.patch";
-      hash = "sha256-iA1sZhHI8Osgo1ofL5RTqgVzUG32zx0dU/28qcEqmQc=";
-    })
-
-    # Remove when version > 0.1.2
-    (fetchpatch {
-      name = "0003-lomiri-download-manager-Bump-version-make-Werror-and-tests-optional.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/commit/73ec04c429e5285f05dd72d5bb9720ba6ff31be2.patch";
-      hash = "sha256-0BrJSKCvUhITwfln05OrHgHEpldbgBoh4rivAvw+qrc=";
-    })
-
-    # Remove when version > 0.1.2
-    (fetchpatch {
-      name = "0004-lomiri-download-manager-Use-GNUInstallDirs-variables-for-more-install-destinations.patch";
-      url = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/commit/5d40daf053de62150aa5ee618285e415d7d3f1c8.patch";
-      hash = "sha256-r5fpiJkZkDsYX9fcX5JuPsE/qli9z5/DatmGJ9/QauU=";
+      name = "0001-lomiri-download-manager-Revert-Drop-GetConnectionAppArmorSecurityContext.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/commit/2367f3dff852b69457b1a65a487cb032c210569f.patch";
+      revert = true;
+      hash = "sha256-xS0Wz6d+bZWj/kDGK2WhOduzyP4Rgz3n9n2XY1Zu5hE=";
     })
   ];
 
   postPatch = ''
-    # fetchpatch strips renames
-    # Remove when version > 0.1.2
-    for service in src/{uploads,downloads}/daemon/{lomiri-*-manager,lomiri-*-manager-systemd,com.lomiri.*}.service; do
-      mv "$service" "$service".in
-    done
-
     # pkg_get_variable doesn't let us substitute prefix pkg-config variable from systemd
     substituteInPlace CMakeLists.txt \
       --replace 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_DIR "${placeholder "out"}/lib/systemd/user")' \
@@ -89,6 +66,7 @@ stdenv.mkDerivation (finalAttrs: {
   nativeBuildInputs = [
     cmake
     pkg-config
+    validatePkgConfig
     wrapQtAppsHook
   ] ++ lib.optionals withDocumentation [
     doxygen
@@ -116,10 +94,10 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   cmakeFlags = [
-    "-DENABLE_DOC=${lib.boolToString withDocumentation}"
+    (lib.cmakeBool "ENABLE_DOC" withDocumentation)
     # Deprecation warnings on Qt 5.15
     # https://gitlab.com/ubports/development/core/lomiri-download-manager/-/issues/1
-    "-DENABLE_WERROR=OFF"
+    (lib.cmakeBool "ENABLE_WERROR" false)
   ];
 
   makeTargets = [
@@ -146,6 +124,7 @@ stdenv.mkDerivation (finalAttrs: {
   meta = with lib; {
     description = "Performs uploads and downloads from a centralized location";
     homepage = "https://gitlab.com/ubports/development/core/lomiri-download-manager";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/blob/${finalAttrs.version}/ChangeLog";
     license = licenses.lgpl3Only;
     maintainers = teams.lomiri.members;
     platforms = platforms.linux;
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix
new file mode 100644
index 000000000000..25cf5f7d528e
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/services/lomiri-indicator-network/default.nix
@@ -0,0 +1,134 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, gitUpdater
+, nixosTests
+, testers
+, cmake
+, cmake-extras
+, coreutils
+, dbus
+, doxygen
+, gettext
+, glib
+, gmenuharness
+, gtest
+, intltool
+, libsecret
+, libqofono
+, libqtdbusmock
+, libqtdbustest
+, lomiri-api
+, lomiri-url-dispatcher
+, networkmanager
+, ofono
+, pkg-config
+, python3
+, qtdeclarative
+, qtbase
+, validatePkgConfig
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "lomiri-indicator-network";
+  version = "1.0.2";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/lomiri-indicator-network";
+    rev = finalAttrs.version;
+    hash = "sha256-9AQCWCZFbt4XcmKsjoTXJlWOm02/kBhpPxbHRtftNFM=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  postPatch = ''
+    # Queried via pkg-config, would need to override a prefix variable
+    # Needs CMake 3.28 or higher to do as part of the call, https://github.com/NixOS/nixpkgs/pull/275284
+    substituteInPlace data/CMakeLists.txt \
+      --replace 'pkg_get_variable(DBUS_SESSION_BUS_SERVICES_DIR dbus-1 session_bus_services_dir)' 'set(DBUS_SESSION_BUS_SERVICES_DIR "''${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/services")' \
+      --replace 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'set(SYSTEMD_USER_DIR "''${CMAKE_INSTALL_PREFIX}/lib/systemd/user")'
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    gettext
+    intltool
+    pkg-config
+    qtdeclarative
+    validatePkgConfig
+  ];
+
+  buildInputs = [
+    cmake-extras
+    dbus
+    glib
+    libqofono
+    libsecret
+    lomiri-api
+    lomiri-url-dispatcher
+    networkmanager
+    ofono
+    qtbase
+  ];
+
+  nativeCheckInputs = [
+    (python3.withPackages (ps: with ps; [
+      python-dbusmock
+    ]))
+  ];
+
+  checkInputs = [
+    gmenuharness
+    gtest
+    libqtdbusmock
+    libqtdbustest
+  ];
+
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
+    (lib.cmakeBool "GSETTINGS_COMPILE" true)
+    (lib.cmakeBool "ENABLE_TESTS" finalAttrs.doCheck)
+    (lib.cmakeBool "ENABLE_UBUNTU_COMPAT" true) # just in case something needs it
+    (lib.cmakeBool "BUILD_DOC" true) # lacks QML docs, needs qdoc: https://github.com/NixOS/nixpkgs/pull/245379
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  postInstall = ''
+    substituteInPlace $out/etc/dbus-1/services/com.lomiri.connectivity1.service \
+      --replace '/bin/false' '${lib.getExe' coreutils "false"}'
+  '';
+
+  passthru = {
+    ayatana-indicators = [
+      "lomiri-indicator-network"
+    ];
+    tests = {
+      pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+      vm = nixosTests.ayatana-indicators;
+    };
+    updateScript = gitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "Ayatana indiator exporting the network settings menu through D-Bus";
+    homepage = "https://gitlab.com/ubports/development/core/lomiri-indicator-network";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-indicator-network/-/blob/${finalAttrs.version}/ChangeLog";
+    license = licenses.gpl3Only;
+    maintainers = teams.lomiri.members;
+    platforms = platforms.linux;
+    pkgConfigModules = [
+      "lomiri-connectivity-qt1"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/lomiri-thumbnailer/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/lomiri-thumbnailer/default.nix
new file mode 100644
index 000000000000..7f2a5d256cb0
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/services/lomiri-thumbnailer/default.nix
@@ -0,0 +1,212 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, gitUpdater
+, testers
+, boost
+, cmake
+, cmake-extras
+, doxygen
+, gst_all_1
+, gdk-pixbuf
+, gtest
+, makeFontsConf
+, libapparmor
+, libexif
+, libqtdbustest
+, librsvg
+, lomiri-api
+, persistent-cache-cpp
+, pkg-config
+, python3
+, qtbase
+, qtdeclarative
+, shared-mime-info
+, taglib
+, validatePkgConfig
+, wrapGAppsHook
+, xvfb-run
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "lomiri-thumbnailer";
+  version = "3.0.3";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/lomiri-thumbnailer";
+    rev = finalAttrs.version;
+    hash = "sha256-BE/U4CT4z4WzEJXrVhX8ME/x9q7w8wNnJKTbfVku2VQ=";
+  };
+
+  outputs = [
+    "out"
+    "dev"
+    "doc"
+  ];
+
+  patches = [
+    # Remove when https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/merge_requests/19 merged & in release
+    (fetchpatch {
+      name = "0001-lomiri-thumbnailer-Add-more-better-GNUInstallDirs-variables-usage.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/commit/0b9795a6313fd025d5646f2628a2cbb3104b0ebc.patch";
+      hash = "sha256-br99n2nDLjUfnjbjhOsWlvP62VmVjYeZ6yPs1dhPN/s=";
+    })
+
+    # Remove when https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/merge_requests/22 merged & in release
+    (fetchpatch {
+      name = "0002-lomiri-thumbnailer-Make-tests-optional.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/commit/df7a3d1689f875d207a90067b957e888160491b9.patch";
+      hash = "sha256-gVxigpSL/3fXNdJBjh8Ex3/TYmQUiwRji/NmLW/uhE4=";
+    })
+
+    # Remove when https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/merge_requests/23 merged & in release
+    (fetchpatch {
+      name = "0003-lomiri-thumbnailer-doc-liblomiri-thumbnailer-qt-Honour-CMAKE_INSTALL_DOCDIR.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/commit/930a3b57e899f6eb65a96d096edaea6a6f6b242a.patch";
+      hash = "sha256-klYycUoQqA+Dfk/4fRQgdS4/G4o0sC1k98mbtl0iHkE=";
+    })
+    (fetchpatch {
+      name = "0004-lomiri-thumbnailer-Re-enable-documentation.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/commit/2f9186f71fdd25e8a0852073f1da59ba6169cf3f.patch";
+      hash = "sha256-youaJfCeYVpLmruHMupuUdl0c/bSDPWqKPLgu5plBrw=";
+    })
+    (fetchpatch {
+      name = "0005-lomiri-thumbnailer-doc-liblomiri-thumbnailer-qt-examples-Drop-qt5_use_modules-usage.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/commit/9e5cf09de626e73e6b8f180cbc1160ebd2f169e7.patch";
+      hash = "sha256-vfNCN7tqq6ngzNmb3qqHDHaDx/kI8/UXyyv7LqUWya0=";
+    })
+    (fetchpatch {
+      name = "0006-lomiri-thumbnailer-Re-enable-coverge-reporting.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/commit/6a48831f042cd3ad34200f32800393d4eec2f84b.patch";
+      hash = "sha256-HZd4K0R1W6adOjKy7tODfQAD+9IKPcK0DnH1uKNd/Ak=";
+    })
+    (fetchpatch {
+      name = "0007-lomiri-thumbnailer-Make-GTest-available-to-example-test.patch";
+      url = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/commit/657be3bd1aeb227edc04e26b597b2fe97b2dc51a.patch";
+      hash = "sha256-XEvdWV3JJujG16+87iewYor0jFK7NTeE5459iT96SkU=";
+    })
+  ];
+
+  postPatch = ''
+    patchShebangs tools/{parse-settings.py,run-xvfb.sh} tests/{headers,whitespace,server}/*.py
+
+    substituteInPlace tests/thumbnailer-admin/thumbnailer-admin_test.cpp \
+      --replace '/usr/bin/test' 'test'
+
+    substituteInPlace plugins/*/Thumbnailer*/CMakeLists.txt \
+      --replace "\''${CMAKE_INSTALL_LIBDIR}/qt5/qml" "\''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}"
+
+    # I think this variable fails to be populated because of our toolchain, while upstream uses Debian / Ubuntu where this works fine
+    # https://cmake.org/cmake/help/v3.26/variable/CMAKE_LIBRARY_ARCHITECTURE.html
+    # > If the <LANG> compiler passes to the linker an architecture-specific system library search directory such as
+    # > <prefix>/lib/<arch> this variable contains the <arch> name if/as detected by CMake.
+    substituteInPlace tests/qml/CMakeLists.txt \
+      --replace 'CMAKE_LIBRARY_ARCHITECTURE' 'CMAKE_SYSTEM_PROCESSOR' \
+      --replace 'powerpc-linux-gnu' 'ppc' \
+      --replace 's390x-linux-gnu' 's390x'
+
+    # Tests run in parallel to other builds, don't suck up cores
+    substituteInPlace tests/headers/compile_headers.py \
+      --replace 'max_workers=multiprocessing.cpu_count()' "max_workers=1"
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    doxygen
+    gdk-pixbuf # setup hook
+    pkg-config
+    (python3.withPackages (ps: with ps; lib.optionals finalAttrs.doCheck [
+      python-dbusmock
+      tornado
+    ]))
+    validatePkgConfig
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    boost
+    cmake-extras
+    gdk-pixbuf
+    libapparmor
+    libexif
+    librsvg
+    lomiri-api
+    persistent-cache-cpp
+    qtbase
+    qtdeclarative
+    shared-mime-info
+    taglib
+  ] ++ (with gst_all_1; [
+    gstreamer
+    gst-plugins-base
+    gst-plugins-good
+    gst-plugins-bad
+    # maybe add ugly to cover all kinds of formats?
+  ]);
+
+  nativeCheckInputs = [
+    shared-mime-info
+    xvfb-run
+  ];
+
+  checkInputs = [
+    gtest
+    libqtdbustest
+  ];
+
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    (lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
+    (lib.cmakeBool "GSETTINGS_COMPILE" true)
+    # error: use of old-style cast to 'std::remove_reference<_GstElement*>::type' {aka 'struct _GstElement*'}
+    (lib.cmakeBool "Werror" false)
+    (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
+      # QSignalSpy tests in QML suite always fail, pass when running interactively
+      "-E" "^qml"
+    ]))
+  ];
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  enableParallelChecking = false;
+
+  preCheck = ''
+    # Fontconfig warnings breaks some tests
+    export FONTCONFIG_FILE=${makeFontsConf { fontDirectories = []; }}
+    export HOME=$TMPDIR
+
+    # Some tests need Qt plugins
+    export QT_PLUGIN_PATH=${lib.getBin qtbase}/${qtbase.qtPluginPrefix}
+
+    # QML tests need QML modules
+    export QML2_IMPORT_PATH=${lib.getBin qtdeclarative}/${qtbase.qtQmlPrefix}
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --prefix XDG_DATA_DIRS : ${lib.makeSearchPath "share" [ shared-mime-info ]}
+    )
+  '';
+
+  passthru = {
+    tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+    updateScript = gitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "D-Bus service for out of process thumbnailing";
+    homepage = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer";
+    changelog = "https://gitlab.com/ubports/development/core/lomiri-thumbnailer/-/blob/${finalAttrs.version}/ChangeLog";
+    license = with licenses; [ gpl3Only lgpl3Only ];
+    maintainers = teams.lomiri.members;
+    platforms = platforms.linux;
+    pkgConfigModules = [
+      "liblomiri-thumbnailer-qt"
+    ];
+  };
+})
diff --git a/nixpkgs/pkgs/desktops/lomiri/services/telephony-service/default.nix b/nixpkgs/pkgs/desktops/lomiri/services/telephony-service/default.nix
new file mode 100644
index 000000000000..63a426aa30e0
--- /dev/null
+++ b/nixpkgs/pkgs/desktops/lomiri/services/telephony-service/default.nix
@@ -0,0 +1,197 @@
+{ stdenv
+, lib
+, fetchFromGitLab
+, fetchpatch
+, fetchpatch2
+, gitUpdater
+, nixosTests
+, ayatana-indicator-messages
+, bash
+, cmake
+, dbus
+, dbus-glib
+, dbus-test-runner
+, dconf
+, gettext
+, glib
+, gnome
+, history-service
+, libnotify
+, libphonenumber
+, libpulseaudio
+, libusermetrics
+, lomiri-ui-toolkit
+, lomiri-url-dispatcher
+, makeWrapper
+, pkg-config
+, protobuf
+, python3
+, qtbase
+, qtdeclarative
+, qtfeedback
+, qtmultimedia
+, qtpim
+, telepathy
+, telepathy-glib
+, telepathy-mission-control
+, xvfb-run
+}:
+
+let
+  replaceDbusService = pkg: name: "--replace \"\\\${DBUS_SERVICES_DIR}/${name}\" \"${pkg}/share/dbus-1/services/${name}\"";
+in
+stdenv.mkDerivation (finalAttrs: {
+  pname = "telephony-service";
+  version = "0.5.3";
+
+  src = fetchFromGitLab {
+    owner = "ubports";
+    repo = "development/core/telephony-service";
+    rev = finalAttrs.version;
+    hash = "sha256-eLGwAJmBDDvSODQUNr/zcPA/0DdXtVBiS7vg+iIYPDo=";
+  };
+
+  patches = [
+    # Remove when https://gitlab.com/ubports/development/core/telephony-service/-/merge_requests/90 merged & in release
+    (fetchpatch {
+      name = "0001-telephony-service-CMakeLists-Make-tests-optional.patch";
+      url = "https://gitlab.com/ubports/development/core/telephony-service/-/commit/9a8297bcf9b34d77ffdae3dfe4ad2636022976fb.patch";
+      hash = "sha256-Za4ZGKnw9iz2RP1LzLhKrEJ1vLUufWk8J07LmWDW40E=";
+    })
+  ];
+
+  postPatch = ''
+    # Queries qmake for the QML installation path, which returns a reference to Qt5's build directory
+    substituteInPlace CMakeLists.txt \
+      --replace "\''${QMAKE_EXECUTABLE} -query QT_INSTALL_QML" "echo $out/${qtbase.qtQmlPrefix}"
+
+  '' + lib.optionalString finalAttrs.finalPackage.doCheck ''
+    substituteInPlace tests/common/dbus-services/CMakeLists.txt \
+      ${replaceDbusService telepathy-mission-control "org.freedesktop.Telepathy.MissionControl5.service"} \
+      ${replaceDbusService telepathy-mission-control "org.freedesktop.Telepathy.AccountManager.service"} \
+      ${replaceDbusService dconf "ca.desrt.dconf.service"}
+
+    substituteInPlace cmake/modules/GenerateTest.cmake \
+      --replace '/usr/lib/dconf' '${lib.getLib dconf}/libexec' \
+      --replace '/usr/lib/telepathy' '${lib.getLib telepathy-mission-control}/libexec'
+  '';
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    makeWrapper
+  ];
+
+  buildInputs = [
+    ayatana-indicator-messages
+    bash
+    dbus-glib
+    dbus
+    dconf
+    gettext
+    glib
+    history-service
+    libnotify
+    libphonenumber
+    libpulseaudio
+    libusermetrics
+    lomiri-url-dispatcher
+    protobuf
+    (python3.withPackages (ps: with ps; [
+      dbus-python
+      pygobject3
+    ]))
+    qtbase
+    qtdeclarative
+    qtfeedback
+    qtmultimedia
+    qtpim
+    telepathy
+    telepathy-glib
+    telepathy-mission-control
+  ];
+
+  nativeCheckInputs = [
+    dbus-test-runner
+    dconf
+    gnome.gnome-keyring
+    telepathy-mission-control
+    xvfb-run
+  ];
+
+  dontWrapQtApps = true;
+
+  cmakeFlags = [
+    # These rely on libphonenumber reformatting inputs to certain results
+    # Seem to be broken for a small amount of numbers, maybe libphonenumber version change?
+    (lib.cmakeBool "SKIP_QML_TESTS" true)
+    (lib.cmakeFeature "CMAKE_CTEST_ARGUMENTS" (lib.concatStringsSep ";" [
+      # Exclude tests
+      "-E" (lib.strings.escapeShellArg "(${lib.concatStringsSep "|" [
+        # Flaky, randomly failing to launch properly & stuck until test timeout
+        "^HandlerTest"
+        "^OfonoAccountEntryTest"
+        "^TelepathyHelperSetupTest"
+        "^AuthHandlerTest"
+        "^ChatManagerTest"
+      ]})")
+    ]))
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString ([
+    "-I${lib.getDev telepathy-glib}/include/telepathy-1.0" # it's in telepathy-farstream's Requires.private, so it & its dependencies don't get pulled in
+    "-I${lib.getDev dbus-glib}/include/dbus-1.0" # telepathy-glib dependency
+    "-I${lib.getDev dbus}/include/dbus-1.0" # telepathy-glib dependency
+  ]);
+
+  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+
+  # Starts & talks to D-Bus services, breaks with parallelism
+  enableParallelChecking = false;
+
+  preCheck = ''
+    export QT_QPA_PLATFORM=minimal
+    export QT_PLUGIN_PATH=${lib.makeSearchPathOutput "bin" qtbase.qtPluginPrefix [ qtbase qtpim ]}
+  '';
+
+  postInstall = ''
+    patchShebangs $out/bin/{ofono-setup,phone-gsettings-migration.py}
+
+    # Still missing getprop from libhybris, we don't have it packaged (yet?)
+    wrapProgram $out/bin/ofono-setup \
+      --prefix PATH : ${lib.makeBinPath [ dbus dconf gettext glib telepathy-mission-control ]}
+
+    # These SystemD services are referenced by the installed D-Bus services, but not part of the installation. Why?
+    for service in telephony-service-{approver,indicator}; do
+      install -Dm644 ../debian/telephony-service."$service".user.service $out/lib/systemd/user/"$service".service
+
+      # ofono-setup.service would be rovided by ubuntu-touch-session, we don't plan to package it
+      substituteInPlace $out/lib/systemd/user/"$service".service \
+        --replace '/usr' "$out" \
+        --replace 'Requires=ofono-setup.service' "" \
+        --replace 'After=ofono-setup.service' "" \
+
+      sed -i $out/lib/systemd/user/"$service".service \
+        -e '/ofono-setup.service/d'
+    done
+  '';
+
+  passthru = {
+    ayatana-indicators = [
+      "telephony-service-indicator"
+    ];
+    tests.vm = nixosTests.ayatana-indicators;
+    updateScript = gitUpdater { };
+  };
+
+  meta = with lib; {
+    description = "Backend dispatcher service for various mobile phone related operations";
+    homepage = "https://gitlab.com/ubports/development/core/telephony-service";
+    changelog = "https://gitlab.com/ubports/development/core/telephony-service/-/blob/${finalAttrs.version}/ChangeLog";
+    license = licenses.gpl3Only;
+    maintainers = teams.lomiri.members;
+    platforms = platforms.linux;
+  };
+})