electron_34-bin: fix read out of range on aarch64 16k pages systems (#382497)
This commit is contained in:
commit
fca94f7fff
@ -131,6 +131,13 @@ let
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# Fix read out of range on aarch64 16k pages builds
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/365364
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/380991
|
||||||
|
# Can likely be removed when v34.2.1 (or v32.3.0?) releases:
|
||||||
|
# https://github.com/electron/electron/pull/45571
|
||||||
|
needsAarch64PageSizeFix = lib.versionAtLeast version "34" && stdenv.hostPlatform.isAarch64;
|
||||||
|
|
||||||
linux = finalAttrs: {
|
linux = finalAttrs: {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
glib
|
glib
|
||||||
@ -153,6 +160,19 @@ let
|
|||||||
chmod u-x $out/libexec/electron/*.so*
|
chmod u-x $out/libexec/electron/*.so*
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# We use null here to not cause unnecessary rebuilds.
|
||||||
|
dontWrapGApps = if needsAarch64PageSizeFix then true else null;
|
||||||
|
preFixup =
|
||||||
|
if needsAarch64PageSizeFix then
|
||||||
|
''
|
||||||
|
wrapProgram "$out/libexec/electron/chrome_crashpad_handler" "''${gappsWrapperArgs[@]}"
|
||||||
|
wrapProgram "$out/libexec/electron/chrome-sandbox" "''${gappsWrapperArgs[@]}"
|
||||||
|
wrapProgram "$out/libexec/electron/electron" "''${gappsWrapperArgs[@]}" \
|
||||||
|
--add-flags "--js-flags=--no-decommit-pooled-pages"
|
||||||
|
''
|
||||||
|
else
|
||||||
|
null;
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
patchelf \
|
patchelf \
|
||||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user