From eb7fc22ff9337cadd1bcf3eaa5d65e82fc12c1d9 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Thu, 4 Dec 2025 13:35:56 +0200 Subject: [PATCH] hyprland: use cmake build --- pkgs/by-name/hy/hyprland/package.nix | 30 ++++++++++++---------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/hy/hyprland/package.nix b/pkgs/by-name/hy/hyprland/package.nix index 3fc9a173302d..d55c28a961e4 100644 --- a/pkgs/by-name/hy/hyprland/package.nix +++ b/pkgs/by-name/hy/hyprland/package.nix @@ -63,8 +63,7 @@ let inherit (lib.strings) makeBinPath optionalString - mesonBool - mesonEnable + cmakeBool ; inherit (lib.trivial) importJSON @@ -129,12 +128,13 @@ customStdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ hyprwayland-scanner makeWrapper + cmake + # meson + ninja are used to build the hyprland-protocols submodule meson ninja pkg-config wayland-scanner # for udis86 - cmake python3 ]; @@ -181,24 +181,20 @@ customStdenv.mkDerivation (finalAttrs: { (optionals withSystemd [ systemd ]) ]; - mesonBuildType = if debug then "debug" else "release"; + cmakeBuildType = if debug then "Debug" else "RelWithDebInfo"; dontStrip = debug; strictDeps = true; - mesonFlags = concatLists [ - (mapAttrsToList mesonEnable { - "xwayland" = enableXWayland; - "systemd" = withSystemd; - "uwsm" = false; - "hyprpm" = false; - }) - (mapAttrsToList mesonBool { - # PCH provides no benefits when building with Nix - "b_pch" = false; - "tracy_enable" = false; - }) - ]; + cmakeFlags = mapAttrsToList cmakeBool { + "NO_XWAYLAND" = !enableXWayland; + "NO_SYSTEMD" = !withSystemd; + "CMAKE_DISABLE_PRECOMPILE_HEADERS" = true; + "NO_UWSM" = true; + "NO_HYPRPM" = true; + "TRACY_ENABLE" = false; + "BUILD_HYPRTESTER" = true; + }; postInstall = '' ${optionalString wrapRuntimeDeps ''