Nix: drop ninja for CMake build

This commit is contained in:
Mihai Fufezan 2024-09-22 12:37:08 +03:00
parent 0d6d19b280
commit bbb83317c0

View file

@ -6,8 +6,6 @@
pkgconf, pkgconf,
makeWrapper, makeWrapper,
cmake, cmake,
meson,
ninja,
aquamarine, aquamarine,
binutils, binutils,
cairo, cairo,
@ -57,7 +55,7 @@
inherit (lib.asserts) assertMsg; inherit (lib.asserts) assertMsg;
inherit (lib.attrsets) mapAttrsToList; inherit (lib.attrsets) mapAttrsToList;
inherit (lib.lists) flatten concatLists optional optionals; 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; fs = lib.fileset;
adapters = flatten [ adapters = flatten [
@ -87,7 +85,6 @@ in
../hyprctl ../hyprctl
../hyprland.pc.in ../hyprland.pc.in
../LICENSE ../LICENSE
../meson_options.txt
../protocols ../protocols
../src ../src
../systemd ../systemd
@ -95,7 +92,7 @@ in
(fs.fileFilter (file: file.hasExt "1") ../docs) (fs.fileFilter (file: file.hasExt "1") ../docs)
(fs.fileFilter (file: file.hasExt "conf" || file.hasExt "desktop") ../example) (fs.fileFilter (file: file.hasExt "conf" || file.hasExt "desktop") ../example)
(fs.fileFilter (file: file.hasExt "sh") ../scripts) (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 hyprwayland-scanner
makeWrapper makeWrapper
cmake cmake
ninja
cmake # needed for glaze
pkg-config pkg-config
]; ];
@ -174,23 +169,23 @@ in
strictDeps = true; strictDeps = true;
mesonBuildType = cmakeBuildType =
if debug if debug
then "debug" then "Debug"
else "release"; else "RelWithDebInfo";
mesonFlags = flatten [ # we want as much debug info as possible
(mapAttrsToList mesonEnable { dontStrip = debug;
"xwayland" = enableXWayland;
"systemd" = withSystemd; cmakeFlags = mapAttrsToList cmakeBool {
"uwsm" = false; "NO_XWAYLAND" = !enableXWayland;
"hyprpm" = false; "LEGACY_RENDERER" = legacyRenderer;
}) "NO_SYSTEMD" = !withSystemd;
(mapAttrsToList mesonBool { "CMAKE_DISABLE_PRECOMPILE_HEADERS" = true;
"b_pch" = false; "NO_UWSM" = true;
"tracy_enable" = false; "NO_HYPRPM" = true;
}) "TRACY_ENABLE" = false;
]; };
postInstall = '' postInstall = ''
${optionalString wrapRuntimeDeps '' ${optionalString wrapRuntimeDeps ''