Revert "electron-bin: don't wrap inside libexec"

This reverts commit aa3ba4cb2314c81f4de495a2d99fe60705311a5a.

authored by TomaSajt and committed by Masum Reza 86116722 807a57ff

+14 -10
+14 -10
pkgs/development/tools/electron/binary/generic.nix
··· 157 157 chmod u-x $out/libexec/electron/*.so* 158 158 ''; 159 159 160 - # We don't want to wrap the contents of $out/libexec automatically 161 - dontWrapGApps = true; 162 - 163 - preFixup = '' 164 - makeWrapper "$out/libexec/electron/electron" $out/bin/electron \ 165 - "''${gappsWrapperArgs[@]}" \ 166 - ${lib.optionalString needsAarch64PageSizeFix "--add-flags '--js-flags=--no-decommit-pooled-pages'"} 167 - ''; 160 + # We use null here to not cause unnecessary rebuilds. 161 + dontWrapGApps = if needsAarch64PageSizeFix then true else null; 162 + preFixup = 163 + if needsAarch64PageSizeFix then 164 + '' 165 + wrapProgram "$out/libexec/electron/chrome_crashpad_handler" "''${gappsWrapperArgs[@]}" 166 + wrapProgram "$out/libexec/electron/chrome-sandbox" "''${gappsWrapperArgs[@]}" 167 + wrapProgram "$out/libexec/electron/electron" "''${gappsWrapperArgs[@]}" \ 168 + --add-flags "--js-flags=--no-decommit-pooled-pages" 169 + '' 170 + else 171 + null; 168 172 169 173 postFixup = '' 170 174 patchelf \ 171 175 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 172 176 --set-rpath "${electronLibPath}:$out/libexec/electron" \ 173 - $out/libexec/electron/electron \ 174 - $out/libexec/electron/chrome_crashpad_handler 177 + $out/libexec/electron/.electron-wrapped \ 178 + $out/libexec/electron/.chrome_crashpad_handler-wrapped 175 179 176 180 # patch libANGLE 177 181 patchelf \