-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
/
default.nix
96 lines (79 loc) · 1.9 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{ 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=";
})
];
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;
maintainers = teams.lomiri.members;
platforms = platforms.unix;
pkgConfigModules = [
"libgmenuharness"
];
};
})