diff options
| author | Mihai Fufezan <mihai@fufexan.net> | 2024-09-22 12:37:08 +0300 |
|---|---|---|
| committer | Mihai Fufezan <mihai@fufexan.net> | 2025-10-13 23:15:18 +0300 |
| commit | bbb83317c03fd925862eaf4b0c2eeb06967283d4 (patch) | |
| tree | 952fec51891d618a17b033eed98370a898681343 | |
| parent | 0d6d19b280b9e2f57d078dd47690e7dd60c95376 (diff) | |
Nix: drop ninja for CMake build
| -rw-r--r-- | nix/default.nix | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/nix/default.nix b/nix/default.nix index 21b7690f..a9d5c2d6 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -6,8 +6,6 @@ pkgconf, makeWrapper, cmake, - meson, - ninja, aquamarine, binutils, cairo, @@ -57,7 +55,7 @@ inherit (lib.asserts) assertMsg; inherit (lib.attrsets) mapAttrsToList; inherit (lib.lists) flatten concatLists optional optionals; - inherit (lib.strings) makeBinPath optionalString mesonBool mesonEnable trim; + inherit (lib.strings) makeBinPath optionalString cmakeBool trim; fs = lib.fileset; adapters = flatten [ @@ -87,7 +85,6 @@ in ../hyprctl ../hyprland.pc.in ../LICENSE - ../meson_options.txt ../protocols ../src ../systemd @@ -95,7 +92,7 @@ in (fs.fileFilter (file: file.hasExt "1") ../docs) (fs.fileFilter (file: file.hasExt "conf" || file.hasExt "desktop") ../example) (fs.fileFilter (file: file.hasExt "sh") ../scripts) - (fs.fileFilter (file: file.name == "meson.build") ../.) + (fs.fileFilter (file: file.name == "CMakeLists.txt") ../.) ]); }; @@ -121,8 +118,6 @@ in hyprwayland-scanner makeWrapper cmake - ninja - cmake # needed for glaze pkg-config ]; @@ -174,23 +169,23 @@ in strictDeps = true; - mesonBuildType = + cmakeBuildType = if debug - then "debug" - else "release"; - - mesonFlags = flatten [ - (mapAttrsToList mesonEnable { - "xwayland" = enableXWayland; - "systemd" = withSystemd; - "uwsm" = false; - "hyprpm" = false; - }) - (mapAttrsToList mesonBool { - "b_pch" = false; - "tracy_enable" = false; - }) - ]; + then "Debug" + else "RelWithDebInfo"; + + # we want as much debug info as possible + dontStrip = debug; + + cmakeFlags = mapAttrsToList cmakeBool { + "NO_XWAYLAND" = !enableXWayland; + "LEGACY_RENDERER" = legacyRenderer; + "NO_SYSTEMD" = !withSystemd; + "CMAKE_DISABLE_PRECOMPILE_HEADERS" = true; + "NO_UWSM" = true; + "NO_HYPRPM" = true; + "TRACY_ENABLE" = false; + }; postInstall = '' ${optionalString wrapRuntimeDeps '' |
