This commit is contained in:
parent
622728dcaf
commit
9d289ae6c7
1 changed files with 6 additions and 12 deletions
|
|
@ -3,16 +3,10 @@
|
||||||
let
|
let
|
||||||
hyprland-pkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
|
hyprland-pkgs = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
|
|
||||||
# hyprutils-0.13.1 was compiled with GCC 15 (requires GLIBCXX_3.4.34) but
|
# hyprutils-0.13.1 requires GLIBCXX_3.4.34 (GCC 15) but Hyprland's RPATH
|
||||||
# its RPATH was patched to gcc-14.3.0-lib which only goes to GLIBCXX_3.4.33.
|
# was patched to gcc-14.3.0-lib which only provides up to GLIBCXX_3.4.33.
|
||||||
# Locate gcc-15's libstdc++ from Hyprland's own runtime closure (hyprutils
|
# Use our nixpkgs GCC 15 to supply the missing symbol via LD_PRELOAD.
|
||||||
# is a transitive dep, so gcc-15-lib will appear here too).
|
gcc15-stdlib = pkgs.gcc15.cc.lib;
|
||||||
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"))));
|
|
||||||
|
|
||||||
hyprland-wrapped = pkgs.symlinkJoin {
|
hyprland-wrapped = pkgs.symlinkJoin {
|
||||||
name = hyprland-pkgs.hyprland.name;
|
name = hyprland-pkgs.hyprland.name;
|
||||||
|
|
@ -28,9 +22,9 @@ let
|
||||||
};
|
};
|
||||||
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-stdlib}/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-stdlib}/lib/libstdc++.so.6"
|
||||||
|
|
||||||
# The session .desktop symlinks to the original package and contains
|
# The session .desktop symlinks to the original package and contains
|
||||||
# its absolute store path. Rewrite Exec= to our wrapped binary so
|
# its absolute store path. Rewrite Exec= to our wrapped binary so
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue