diff options
author | Vaxry <[email protected]> | 2024-08-08 10:54:41 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-08-08 11:54:41 +0200 |
commit | 83a334f97df4389ca30cb63e50317a66a82562b9 (patch) | |
tree | be03ceb8abfd97443ab846cfb624d38028f52c74 /nix | |
parent | 9a09eac79b85c846e3a865a9078a3f8ff65a9259 (diff) | |
download | Hyprland-83a334f97df4389ca30cb63e50317a66a82562b9.tar.gz Hyprland-83a334f97df4389ca30cb63e50317a66a82562b9.zip |
core: Move to C++26 and use native_handle to CLOEXEC the debug fd (#7219)
Requires GCC >= 14 / Clang >= 18
---------
Co-authored-by: Mihai Fufezan <[email protected]>
Diffstat (limited to 'nix')
-rw-r--r-- | nix/default.nix | 5 | ||||
-rw-r--r-- | nix/overlays.nix | 2 | ||||
-rw-r--r-- | nix/stdcxx.patch | 12 |
3 files changed, 18 insertions, 1 deletions
diff --git a/nix/default.nix b/nix/default.nix index e4e12f43..9bae9d83 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -71,6 +71,11 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov src = lib.cleanSource ../.; }; + patches = [ + # forces GCC to use -std=c++26 + ./stdcxx.patch + ]; + postPatch = '' # Fix hardcoded paths to /usr installation sed -i "s#/usr#$out#" src/render/OpenGL.cpp diff --git a/nix/overlays.nix b/nix/overlays.nix index d8979b45..36206f46 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -31,7 +31,7 @@ in { date = mkDate (self.lastModifiedDate or "19700101"); in { hyprland = final.callPackage ./default.nix { - stdenv = final.gcc13Stdenv; + stdenv = final.gcc14Stdenv; version = "${version}+date=${date}_${self.shortRev or "dirty"}"; commit = self.rev or ""; inherit date; diff --git a/nix/stdcxx.patch b/nix/stdcxx.patch new file mode 100644 index 00000000..032e494d --- /dev/null +++ b/nix/stdcxx.patch @@ -0,0 +1,12 @@ +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 |