From 9264436f35e2c4e94adfdf2a8ea23a346ace3a65 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 5 Dec 2025 14:16:22 +0000 Subject: desktop: rewrite reserved area handling + improve tests (#12383) --- nix/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'nix/default.nix') diff --git a/nix/default.nix b/nix/default.nix index 38ff0bc3..c8c4b044 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -12,6 +12,7 @@ epoll-shim, git, glaze, + gtest, hyprcursor, hyprgraphics, hyprland-protocols, @@ -40,6 +41,7 @@ xorg, xwayland, debug ? false, + withTests ? false, enableXWayland ? true, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, wrapRuntimeDeps ? true, @@ -75,7 +77,7 @@ in assert assertMsg (!withHyprtester) "The option `withHyprtester` has been removed. Hyprtester is always built now."; customStdenv.mkDerivation (finalAttrs: { pname = "hyprland${optionalString debug "-debug"}"; - inherit version; + inherit version withTests; src = fs.toSource { root = ../.; @@ -88,7 +90,6 @@ in ../assets/install ../hyprctl ../hyprland.pc.in - ../hyprtester ../LICENSE ../protocols ../src @@ -98,6 +99,7 @@ in (fs.fileFilter (file: file.hasExt "conf" || file.hasExt "desktop") ../example) (fs.fileFilter (file: file.hasExt "sh") ../scripts) (fs.fileFilter (file: file.name == "CMakeLists.txt") ../.) + (optional withTests [../tests ../hyprtester]) ])); }; @@ -141,6 +143,7 @@ in cairo git glaze + gtest hyprcursor hyprgraphics hyprland-protocols @@ -195,7 +198,7 @@ in "NO_UWSM" = true; "NO_HYPRPM" = true; "TRACY_ENABLE" = false; - "BUILD_HYPRTESTER" = true; + "WITH_TESTS" = withTests; }; preConfigure = '' @@ -215,8 +218,11 @@ in ]} ''} - install hyprtester/pointer-warp -t $out/bin - install hyprtester/pointer-scroll -t $out/bin + ${optionalString withTests '' + install hyprtester/pointer-warp -t $out/bin + install hyprtester/pointer-scroll -t $out/bin + install hyprland_gtests -t $out/bin + ''} ''; passthru.providedSessions = ["hyprland"]; -- cgit v1.2.3