From 9d289ae6c7ae3a27b9131cc439c66522b80f4f58 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Wed, 13 May 2026 23:18:32 +0100 Subject: [PATCH] --- settings/hyprland.nix | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 929a78d..d2f6c4b 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -3,16 +3,10 @@ let hyprland-pkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}; - # hyprutils-0.13.1 was compiled with GCC 15 (requires GLIBCXX_3.4.34) but - # its RPATH was patched to gcc-14.3.0-lib which only goes to GLIBCXX_3.4.33. - # Locate gcc-15's libstdc++ from Hyprland's own runtime closure (hyprutils - # is a transitive dep, so gcc-15-lib will appear here too). - gcc15-lib = lib.head (lib.filter - (p: lib.hasSuffix "-lib" p && lib.match ".*/gcc-[0-9]+\\.[0-9]+\\.[0-9]+-lib" p != null) - (lib.splitString "\n" - (lib.removeSuffix "\n" - (builtins.readFile - "${pkgs.closureInfo { rootPaths = [ hyprland-pkgs.hyprland ]; }}/store-paths")))); + # hyprutils-0.13.1 requires GLIBCXX_3.4.34 (GCC 15) but Hyprland's RPATH + # was patched to gcc-14.3.0-lib which only provides up to GLIBCXX_3.4.33. + # Use our nixpkgs GCC 15 to supply the missing symbol via LD_PRELOAD. + gcc15-stdlib = pkgs.gcc15.cc.lib; hyprland-wrapped = pkgs.symlinkJoin { name = hyprland-pkgs.hyprland.name; @@ -28,9 +22,9 @@ let }; postBuild = '' wrapProgram $out/bin/start-hyprland \ - --set LD_PRELOAD "${gcc15-lib}/lib/libstdc++.so.6" + --set LD_PRELOAD "${gcc15-stdlib}/lib/libstdc++.so.6" wrapProgram $out/bin/Hyprland \ - --set LD_PRELOAD "${gcc15-lib}/lib/libstdc++.so.6" + --set LD_PRELOAD "${gcc15-stdlib}/lib/libstdc++.so.6" # The session .desktop symlinks to the original package and contains # its absolute store path. Rewrite Exec= to our wrapped binary so