mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
lomiri.libusermetrics: 1.3.2 -> 1.3.3
This commit is contained in:
parent
0a810476ad
commit
31227b2491
@ -1,12 +1,14 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, gitUpdater
|
||||
, testers
|
||||
, cmake
|
||||
, cmake-extras
|
||||
, dbus
|
||||
, doxygen
|
||||
, glibcLocales
|
||||
, gsettings-qt
|
||||
, gtest
|
||||
, intltool
|
||||
@ -25,13 +27,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libusermetrics";
|
||||
version = "1.3.2";
|
||||
version = "1.3.3";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ubports";
|
||||
repo = "development/core/libusermetrics";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-jmJH5vByBnBqgQfyb7HNVe+eS/jHcU64R2dnvuLbqss=";
|
||||
hash = "sha256-V4vxNyHMs2YYBILkpco79FN9xnooULgB+z2Kf3V0790=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
@ -41,21 +43,21 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Not submitted yet, waiting for decision on how CMake testing should be handled
|
||||
./2001-Remove-custom-check-target.patch
|
||||
|
||||
# Due to https://gitlab.com/ubports/development/core/libusermetrics/-/issues/8, we require knowledge about AppArmor availability at launch time
|
||||
# Custom patch to launch a module-defined service that can handle this
|
||||
./2002-Launch-module-created-systemd-service.patch
|
||||
# Remove when https://gitlab.com/ubports/development/core/libusermetrics/-/merge_requests/17 merged & in release
|
||||
(fetchpatch {
|
||||
name = "0001-libusermetrics-BUILD_TESTING.patch";
|
||||
url = "https://gitlab.com/ubports/development/core/libusermetrics/-/commit/c1e4847601cc4522034a766755ce491d48132d77.patch";
|
||||
hash = "sha256-UWc9/ngpuiSm0Rd6eBK/R3N/NwDRtMxie78seN3+y/8=";
|
||||
})
|
||||
];
|
||||
|
||||
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 'query_qmake(QT_INSTALL_QML QT_IMPORTS_DIR)' 'set(QT_IMPORTS_DIR "''${CMAKE_INSTALL_PREFIX}/${qtbase.qtQmlPrefix}")'
|
||||
--replace-fail '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}"
|
||||
--replace-fail "\''${CMAKE_INSTALL_FULL_DATAROOTDIR}/doc/libusermetrics-doc" "\''${CMAKE_INSTALL_DOCDIR}"
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
@ -82,8 +84,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
qtbase
|
||||
];
|
||||
|
||||
# Tests need to be able to check locale
|
||||
LC_ALL = lib.optionalString finalAttrs.finalPackage.doCheck "en_US.UTF-8";
|
||||
|
||||
nativeCheckInputs = [
|
||||
dbus
|
||||
glibcLocales
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
@ -96,14 +102,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
(lib.cmakeBool "GSETTINGS_LOCALINSTALL" true)
|
||||
(lib.cmakeBool "GSETTINGS_COMPILE" true)
|
||||
(lib.cmakeBool "ENABLE_CLICK" 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;
|
||||
@ -118,13 +116,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
updateScript = gitUpdater { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
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;
|
||||
license = lib.licenses.lgpl3Only;
|
||||
maintainers = lib.teams.lomiri.members;
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "usermetricsinput";
|
||||
pkgConfigModules = [
|
||||
"libusermetricsinput-1"
|
||||
|
Loading…
Reference in New Issue
Block a user