diff options
author | diniamo <[email protected]> | 2024-09-13 17:29:41 +0200 |
---|---|---|
committer | Mihai Fufezan <[email protected]> | 2024-09-13 19:44:38 +0300 |
commit | c35ed8363f321bb9925bc5e6f5ff03a903593802 (patch) | |
tree | 6eda3de921d17955d81193fc5343e13e2f971d53 | |
parent | d505b3366533b71d57156469c926e8b2b75afb89 (diff) | |
download | Hyprland-c35ed8363f321bb9925bc5e6f5ff03a903593802.tar.gz Hyprland-c35ed8363f321bb9925bc5e6f5ff03a903593802.zip |
nix: adapt cmake options
-rw-r--r-- | nix/cmake-version.patch | 10 | ||||
-rw-r--r-- | nix/default.nix | 21 | ||||
-rw-r--r-- | nix/stdcxx.patch | 12 |
3 files changed, 7 insertions, 36 deletions
diff --git a/nix/cmake-version.patch b/nix/cmake-version.patch deleted file mode 100644 index ccc9c738..00000000 --- a/nix/cmake-version.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 6fdf98db..d8424d91 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required(VERSION 3.30) -+cmake_minimum_required(VERSION 3.27) - - # Get version - file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW) diff --git a/nix/default.nix b/nix/default.nix index d3c7dd5f..8d912fe6 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -62,13 +62,6 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov src = lib.cleanSource ../.; }; - patches = [ - # forces GCC to use -std=c++26 - ./stdcxx.patch - # Nix does not have CMake 3.30 yet, so override the minimum version - ./cmake-version.patch - ]; - postPatch = '' # Fix hardcoded paths to /usr installation sed -i "s#/usr#$out#" src/render/OpenGL.cpp @@ -144,18 +137,18 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov (lib.optionals withSystemd [systemd]) ]; - cmakeBuildType = + mesonBuildType = if debug - then "Debug" - else "RelWithDebInfo"; + then "debug" + else "release"; # we want as much debug info as possible dontStrip = debug; - cmakeFlags = [ - (lib.cmakeBool "NO_XWAYLAND" (!enableXWayland)) - (lib.cmakeBool "LEGACY_RENDERER" legacyRenderer) - (lib.cmakeBool "NO_SYSTEMD" (!withSystemd)) + mesonFlags = [ + (lib.mesonEnable "xwayland" enableXWayland) + (lib.mesonEnable "legacy_renderer" legacyRenderer) + (lib.mesonEnable "systemd" withSystemd) ]; postInstall = '' diff --git a/nix/stdcxx.patch b/nix/stdcxx.patch deleted file mode 100644 index 032e494d..00000000 --- a/nix/stdcxx.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index cfbd431f..73e8e0c2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -64,6 +64,7 @@ endif() - include_directories(. "src/" "subprojects/udis86/" "protocols/") - set(CMAKE_CXX_STANDARD 26) - add_compile_options( -+ -std=c++26 - -Wall - -Wextra - -Wno-unused-parameter |