Fix hyprland_v3
This commit is contained in:
parent
a0990bceee
commit
db7bc35943
1 changed files with 16 additions and 10 deletions
|
|
@ -14,25 +14,31 @@ let
|
||||||
(builtins.readFile
|
(builtins.readFile
|
||||||
"${pkgs.closureInfo { rootPaths = [ hyprland-pkgs.hyprland ]; }}/store-paths"))));
|
"${pkgs.closureInfo { rootPaths = [ hyprland-pkgs.hyprland ]; }}/store-paths"))));
|
||||||
|
|
||||||
hyprland-wrapped = (pkgs.symlinkJoin {
|
hyprland-wrapped = pkgs.symlinkJoin {
|
||||||
name = hyprland-pkgs.hyprland.name;
|
name = hyprland-pkgs.hyprland.name;
|
||||||
paths = [ hyprland-pkgs.hyprland ];
|
paths = [ hyprland-pkgs.hyprland ];
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
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 = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/start-hyprland \
|
wrapProgram $out/bin/start-hyprland \
|
||||||
--set LD_PRELOAD "${gcc15-lib}/lib/libstdc++.so.6"
|
--set LD_PRELOAD "${gcc15-lib}/lib/libstdc++.so.6"
|
||||||
wrapProgram $out/bin/Hyprland \
|
wrapProgram $out/bin/Hyprland \
|
||||||
--set LD_PRELOAD "${gcc15-lib}/lib/libstdc++.so.6"
|
--set LD_PRELOAD "${gcc15-lib}/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"
|
||||||
'';
|
'';
|
||||||
# symlinkJoin lacks passthru; restore it from the original so the display
|
|
||||||
# manager finds providedSessions, and stub override so HM's hyprland module
|
|
||||||
# (which calls package.override { enableXWayland = ... }) doesn't error.
|
|
||||||
}) // {
|
|
||||||
passthru = (hyprland-pkgs.hyprland.passthru or {}) // {
|
|
||||||
providedSessions = [ "hyprland" ];
|
|
||||||
override = _: hyprland-wrapped;
|
|
||||||
};
|
|
||||||
override = _: hyprland-wrapped;
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue