lomiri.libusermetrics: 1.3.0 -> 1.3.2
This commit is contained in:
parent
fd30907d55
commit
79edea7b2b
1 changed files with 10 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue