Skip to content

Commit d70aef1

Browse files
committed
Nix: proper with tests
1 parent c55af82 commit d70aef1

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

nix/default.nix

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
xorg,
4141
xwayland,
4242
debug ? false,
43-
doCheck ? false,
43+
withTests ? false,
4444
enableXWayland ? true,
4545
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
4646
wrapRuntimeDeps ? true,
@@ -76,7 +76,7 @@ in
7676
assert assertMsg (!withHyprtester) "The option `withHyprtester` has been removed. Hyprtester is always built now.";
7777
customStdenv.mkDerivation (finalAttrs: {
7878
pname = "hyprland${optionalString debug "-debug"}";
79-
inherit version doCheck;
79+
inherit version withTests;
8080

8181
src = fs.toSource {
8282
root = ../.;
@@ -89,7 +89,6 @@ in
8989
../assets/install
9090
../hyprctl
9191
../hyprland.pc.in
92-
../hyprtester
9392
../LICENSE
9493
../protocols
9594
../src
@@ -99,7 +98,7 @@ in
9998
(fs.fileFilter (file: file.hasExt "conf" || file.hasExt "desktop") ../example)
10099
(fs.fileFilter (file: file.hasExt "sh") ../scripts)
101100
(fs.fileFilter (file: file.name == "CMakeLists.txt") ../.)
102-
(optional doCheck ../tests)
101+
(optional withTests [../tests ../hyprtester])
103102
]));
104103
};
105104

@@ -196,7 +195,7 @@ in
196195
"NO_UWSM" = true;
197196
"NO_HYPRPM" = true;
198197
"TRACY_ENABLE" = false;
199-
"BUILD_HYPRTESTER" = true;
198+
"WITH_TESTS" = withTests;
200199
};
201200

202201
preConfigure = ''
@@ -216,8 +215,11 @@ in
216215
]}
217216
''}
218217
219-
install hyprtester/pointer-warp -t $out/bin
220-
install hyprtester/pointer-scroll -t $out/bin
218+
${optionalString withTests ''
219+
install hyprtester/pointer-warp -t $out/bin
220+
install hyprtester/pointer-scroll -t $out/bin
221+
install hyprland_gtests -t $out/bin
222+
''}
221223
'';
222224

223225
passthru.providedSessions = ["hyprland"];

nix/overlays.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ in {
4343
};
4444
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
4545

46-
hyprland-with-tests = final.hyprland.override {doCheck = true;};
46+
hyprland-with-tests = final.hyprland.override {withTests = true;};
4747

4848
hyprland-with-hyprtester =
4949
builtins.trace ''

0 commit comments

Comments
 (0)