Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

105 lines
2.1 KiB
Nix

{
stdenv,
lib,
fetchFromGitLab,
fetchpatch,
gitUpdater,
testers,
cmake,
cmake-extras,
dbus,
dbus-test-runner,
glib,
gtest,
libqtdbustest,
lomiri-api,
pkg-config,
qtbase,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gmenuharness";
version = "0.1.4";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/gmenuharness";
rev = finalAttrs.version;
hash = "sha256-MswB8cQvz3JvcJL2zj7szUOBzKRjxzJO7/x+87m7E7c=";
};
patches = [
# Remove when version > 0.1.4
(fetchpatch {
name = "0001-gmenuharness-Rename-type-attribute-from-x-canonical-type-to-x-lomiri-type.patch";
url = "https://gitlab.com/ubports/development/core/gmenuharness/-/commit/70e9ed85792a6ac1950faaf26391ce91e69486ab.patch";
hash = "sha256-jeue0qrl2JZCt/Yfj4jT210wsF/E+MlbtNT/yFTcw5I=";
})
];
postPatch = ''
# GTest needs C++17
# Remove when https://gitlab.com/ubports/development/core/gmenuharness/-/merge_requests/5 merged & in release
substituteInPlace CMakeLists.txt \
--replace-fail 'std=c++14' 'std=c++17'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
cmake-extras
glib
lomiri-api
qtbase
];
nativeCheckInputs = [
dbus
dbus-test-runner
];
checkInputs = [
gtest
libqtdbustest
];
cmakeFlags = [
"-Denable_tests=${lib.boolToString finalAttrs.finalPackage.doCheck}"
];
dontWrapQtApps = true;
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
enableParallelChecking = false;
checkPhase = ''
runHook preCheck
dbus-test-runner -t make -p test -p "''${enableParallelChecking:+-j $NIX_BUILD_CORES}"
runHook postCheck
'';
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = with lib; {
description = "Library to test GMenuModel structures";
homepage = "https://gitlab.com/ubports/development/core/gmenuharness";
license = licenses.gpl3Only;
teams = [ teams.lomiri ];
platforms = platforms.unix;
pkgConfigModules = [
"libgmenuharness"
];
};
})