Skip to content

Commit

Permalink
Merge pull request #335658 from xddxdd/wechat-uos
Browse files Browse the repository at this point in the history
wechat-uos: fix crashing issue caused by zerocallusedregs hardening
  • Loading branch information
Aleksanaa authored Aug 19, 2024
2 parents 7afa2c9 + 539f2e7 commit dacbc70
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkgs/by-name/we/wechat-uos/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
uosLicense ? null
}:
let
# zerocallusedregs hardening breaks WeChat
glibcWithoutHardening = stdenv.cc.libc.overrideAttrs (old: {
hardeningDisable = (old.hardeningDisable or [ ]) ++ [ "zerocallusedregs" ];
});

wechat-uos-env = stdenvNoCC.mkDerivation {
meta.priority = 1;
name = "wechat-uos-env";
Expand Down Expand Up @@ -108,6 +113,9 @@ let
};

wechat-uos-runtime = with xorg; [
# Make sure our glibc without hardening gets picked up first
(lib.hiPrio glibcWithoutHardening)

stdenv.cc.cc
stdenv.cc.libc
pango
Expand Down Expand Up @@ -240,7 +248,7 @@ let
license = licenses.unfree;
platforms = [ "x86_64-linux" "aarch64-linux" "loongarch64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ pokon548 ];
maintainers = with maintainers; [ pokon548 xddxdd ];
mainProgram = "wechat-uos";
};
};
Expand Down

0 comments on commit dacbc70

Please sign in to comment.