From 5655987f66e4d3e1ed57fa0ff7d505e394b90ec3 Mon Sep 17 00:00:00 2001 From: rope Date: Mon, 18 May 2026 13:09:19 +0100 Subject: [PATCH] =?UTF-8?q?hyprland:=20remove=20GCC=2015=20LD=5FPRELOAD=20?= =?UTF-8?q?workaround=20=E2=80=94=20no=20longer=20needed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hyprland 0.55.0 now links GCC 15.2.0 natively, so the symlinkJoin wrapper that injected LD_PRELOAD for the GLIBCXX_3.4.34 symbol is obsolete. Co-Authored-By: Claude Opus 4.6 --- settings/hyprland.nix | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/settings/hyprland.nix b/settings/hyprland.nix index 76ac68a..d909d55 100644 --- a/settings/hyprland.nix +++ b/settings/hyprland.nix @@ -7,45 +7,13 @@ let isMacbook = config.networking.hostName == "FredOS-Macbook"; isGaming = !isMacbook; - # 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; - version = hyprland-pkgs.hyprland.version; - paths = [ hyprland-pkgs.hyprland ]; - nativeBuildInputs = [ pkgs.makeWrapper ]; - # passthru inside symlinkJoin flows through runCommand → mkDerivation, - # which correctly sets drv.passthru. The display manager requires - # providedSessions; HM's hyprland module requires override. - passthru = { - providedSessions = [ "hyprland" ]; - override = _: hyprland-wrapped; - }; - postBuild = '' - wrapProgram $out/bin/start-hyprland \ - --set LD_PRELOAD "${gcc15-stdlib}/lib/libstdc++.so.6" - wrapProgram $out/bin/Hyprland \ - --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 - # GDM actually launches the LD_PRELOAD wrapper, not the bare binary. - desktop=$out/share/wayland-sessions/hyprland.desktop - orig=$(readlink -f "$desktop") - rm "$desktop" - sed "s|^Exec=.*|Exec=$out/bin/start-hyprland|" "$orig" > "$desktop" - ''; - }; in { config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) { programs.hyprland = { enable = true; xwayland.enable = true; - package = hyprland-wrapped; + package = hyprland-pkgs.hyprland; portalPackage = hyprland-pkgs.xdg-desktop-portal-hyprland; }; @@ -125,7 +93,7 @@ in enable = true; configType = "lua"; systemd.variables = [ "--all" ]; - package = hyprland-wrapped; + package = hyprland-pkgs.hyprland; settings = { # hl.config({...}) — all static named-section configuration. @@ -249,7 +217,6 @@ in in '' -- Environment - hl.env("LD_PRELOAD", "") hl.env("XCURSOR_THEME", "Bibata-Modern-Ice") hl.env("XCURSOR_SIZE", "24") hl.env("HYPRCURSOR_THEME", "Bibata-Modern-Ice")