electron-bin: don't wrap inside libexec
This change helps bring electron-bin to a similar structure as the source builds of electron. The primary motivation of this change was to ensure that the `electron` binary inside `libexec/electron` is an actual binary and not a wrapper. This way `electron-fuses` will not complain about not being able to find the necessary sentinel strings inside the binary.
This commit is contained in:
@@ -151,31 +151,26 @@ let
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/libexec/electron $out/bin
|
||||
mkdir -p $out/libexec/electron
|
||||
unzip -d $out/libexec/electron $src
|
||||
ln -s $out/libexec/electron/electron $out/bin
|
||||
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;
|
||||
# We don't want to wrap the contents of $out/libexec automatically
|
||||
dontWrapGApps = true;
|
||||
|
||||
preFixup = ''
|
||||
makeWrapper "$out/libexec/electron/electron" $out/bin/electron \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
${lib.optionalString needsAarch64PageSizeFix "--add-flags '--js-flags=--no-decommit-pooled-pages'"}
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${electronLibPath}:$out/libexec/electron" \
|
||||
$out/libexec/electron/.electron-wrapped \
|
||||
$out/libexec/electron/.chrome_crashpad_handler-wrapped
|
||||
$out/libexec/electron/electron \
|
||||
$out/libexec/electron/chrome_crashpad_handler
|
||||
|
||||
# patch libANGLE
|
||||
patchelf \
|
||||
|
||||
Reference in New Issue
Block a user