hyprland: remove GCC 15 LD_PRELOAD workaround — no longer needed
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 <noreply@anthropic.com>
This commit is contained in:
parent
059e847b6e
commit
5655987f66
1 changed files with 2 additions and 35 deletions
|
|
@ -7,45 +7,13 @@ let
|
||||||
isMacbook = config.networking.hostName == "FredOS-Macbook";
|
isMacbook = config.networking.hostName == "FredOS-Macbook";
|
||||||
isGaming = !isMacbook;
|
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
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) {
|
config = lib.mkIf (lib.elem config.networking.hostName [ "FredOS-Gaming" "FredOS-Macbook" ]) {
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
package = hyprland-wrapped;
|
package = hyprland-pkgs.hyprland;
|
||||||
portalPackage = hyprland-pkgs.xdg-desktop-portal-hyprland;
|
portalPackage = hyprland-pkgs.xdg-desktop-portal-hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -125,7 +93,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
configType = "lua";
|
configType = "lua";
|
||||||
systemd.variables = [ "--all" ];
|
systemd.variables = [ "--all" ];
|
||||||
package = hyprland-wrapped;
|
package = hyprland-pkgs.hyprland;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
# hl.config({...}) — all static named-section configuration.
|
# hl.config({...}) — all static named-section configuration.
|
||||||
|
|
@ -249,7 +217,6 @@ in
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
-- Environment
|
-- Environment
|
||||||
hl.env("LD_PRELOAD", "")
|
|
||||||
hl.env("XCURSOR_THEME", "Bibata-Modern-Ice")
|
hl.env("XCURSOR_THEME", "Bibata-Modern-Ice")
|
||||||
hl.env("XCURSOR_SIZE", "24")
|
hl.env("XCURSOR_SIZE", "24")
|
||||||
hl.env("HYPRCURSOR_THEME", "Bibata-Modern-Ice")
|
hl.env("HYPRCURSOR_THEME", "Bibata-Modern-Ice")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue