about summary refs log tree commit diff
path: root/pkgs/desktops
diff options
context:
space:
mode:
authorOPNA2608 <opna2608@protonmail.com>2024-01-29 14:47:15 +0100
committerOPNA2608 <opna2608@protonmail.com>2024-02-01 13:53:59 +0100
commit79edea7b2bb99a280735c8f067f62af13677ea65 (patch)
tree37545ac7be819e9fc3de1e08e439a8ce6e4b86ef /pkgs/desktops
parentfd30907d5578ab593adf6b675152e8a8a957b9f1 (diff)
lomiri.libusermetrics: 1.3.0 -> 1.3.2
Diffstat (limited to 'pkgs/desktops')
-rw-r--r--pkgs/desktops/lomiri/development/libusermetrics/default.nix32
1 files changed, 10 insertions, 22 deletions
diff --git a/pkgs/desktops/lomiri/development/libusermetrics/default.nix b/pkgs/desktops/lomiri/development/libusermetrics/default.nix
index 0c4ed003e5971..f9e4d38c8cd1d 100644
--- a/pkgs/desktops/lomiri/development/libusermetrics/default.nix
+++ b/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 = [
@@ -40,21 +41,12 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   postPatch = ''
-    substituteInPlace data/CMakeLists.txt \
-      --replace '/etc' "$out/etc"
-
     # 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 +56,7 @@ stdenv.mkDerivation (finalAttrs: {
     doxygen
     intltool
     pkg-config
+    validatePkgConfig
     wrapQtAppsHook
   ];
 
@@ -91,22 +84,16 @@ 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)
   ];
 
   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 +104,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;