Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron{-source,-bin,-chromedriver}: updates #363541

Merged
merged 9 commits into from
Dec 10, 2024

Conversation

teutat3s
Copy link
Member

@teutat3s teutat3s commented Dec 9, 2024

Built on x86_64-linux:

  • all three -bin variants
  • electron_33-source
  • electron_32-source
  • electron_31-source

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@emilylange emilylange added the 1.severity: security Issues which raise a security issue, or PRs that fix one label Dec 9, 2024
@teutat3s teutat3s changed the title electron{-source,_bin,-chromedriver}: updates electron{-source,-bin,-chromedriver}: updates Dec 9, 2024
Copy link
Member

@emilylange emilylange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks :)

I will try to keep an eye on electron and intend to open PRs as well.

nixpkgs-review on x86_64-linux will likely take 6 hours or so on the infra currently delegated to it.

@@ -17,7 +17,7 @@
"src": {
"fetcher": "fetchFromGitiles",
"hash": "sha256-lepGVhzXrBAY5YWwobe18FroRiOD/Q9f8QqazHDmvTY=",
"postFetch": "rm -r $out/third_party/blink/web_tests; rm -r $out/third_party/hunspell/tests; rm -r $out/content/test/data; rm -r $out/courgette/testdata; rm -r $out/extensions/test/data; rm -r $out/media/test/data; ",
"postFetch": "rm -r $out/third_party/blink/web_tests; rm -r $out/third_party/hunspell/tests; rm -r $out/content/test/data; rm -rf $out/courgette/testdata; rm -r $out/extensions/test/data; rm -r $out/media/test/data; ",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chromium has since #357371 (specifically 8dd2f1a) more or less the same logic to resolve the dependencies.
But instead of having a bunch of rm in postFetch, chromium uses a custom recompress = true flag.

This is currently not available to electron as a consumer of the chromium derivation.
Well and it has its own downsides but oh well.

So nothing actionable so far, just as a fyi :)

if (value.url === 'https://chromium.googlesource.com/chromium/src.git') {
value.recompress = true
}

chromiumDeps = lib.mapAttrs (path: args: fetchFromGitiles (removeAttrs args [ "recompress" ] // lib.optionalAttrs args.recompress or false {
name = "source.tar.zstd";
downloadToTemp = false;
passthru.unpack = true;
postFetch = ''
tar \
--use-compress-program="${lib.getExe zstd} -T$NIX_BUILD_CORES" \
--sort=name \
--mtime="1970-01-01" \
--owner=root --group=root \
--numeric-owner --mode=go=rX,u+rw,a-s \
--remove-files \
--directory="$out" \
-cf "$TMPDIR/source.zstd" .
mv "$TMPDIR/source.zstd" "$out"
'';
})) upstream-info.DEPS;

unpackPhaseSnippet = lib.concatStrings (lib.mapAttrsToList (path: dep:
(if dep.unpack or false
then ''
mkdir -p ${path}
pushd ${path}
unpackFile ${dep}
popd
''
else ''
mkdir -p ${builtins.dirOf path}
cp -r ${dep}/. ${path}
''
) + ''
chmod u+w -R ${path}
'') chromiumDeps);

(spoiler: it's recompressTarball all over again)

@emilylange
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 363541


x86_64-linux

✅ 92 packages built:
  • affine
  • antares
  • antimatter-dimensions
  • bilibili
  • bitwarden-desktop
  • bitwarden-directory-connector
  • blockbench
  • bruno
  • camunda-modeler
  • caprine
  • chatd
  • deltachat-desktop
  • drawio
  • drawio-headless
  • electron
  • electron-bin
  • electron-chromedriver
  • electron-chromedriver_31
  • electron-chromedriver_32
  • electron_31
  • electron_31-bin
  • electron_32
  • electron_32-bin
  • element-desktop
  • element-desktop-wayland
  • equibop
  • fcast-receiver
  • feishin
  • follow
  • freetube
  • geogebra6
  • gfn-electron
  • gitify
  • goofcord
  • google-chat-linux
  • headset
  • heroic
  • heroic-unwrapped
  • httptoolkit
  • itch
  • jitsi-meet-electron
  • kando
  • koodo-reader
  • kuro
  • legcord
  • mattermost-desktop
  • morgen
  • mqtt-explorer
  • nix-tour
  • obsidian
  • open-stage-control
  • pandoc-drawio-filter
  • pandoc-drawio-filter.dist
  • pocket-casts
  • podman-desktop
  • pritunl-client
  • proton-pass
  • protonmail-desktop
  • python311Packages.mkdocs-drawio-exporter
  • python311Packages.mkdocs-drawio-exporter.dist
  • python312Packages.mkdocs-drawio-exporter
  • python312Packages.mkdocs-drawio-exporter.dist
  • r2modman
  • redisinsight
  • revolt-desktop
  • ride
  • sharedown
  • sieve-editor-gui
  • siyuan
  • standardnotes
  • stretchly
  • super-productivity
  • teams-for-linux
  • terra-station
  • tetrio-desktop
  • thedesk
  • threema-desktop
  • uhk-agent
  • uhk-udev-rules
  • uivonim
  • vesktop
  • vieb
  • webcord
  • webcord-vencord
  • webtorrent_desktop
  • yandex-music
  • youtube-music
  • ytdownloader
  • ytmdesktop
  • zap-chip-gui
  • zepp-simulator
  • zulip

Manually checked that each electron-source version, element-desktop and bitwarden-desktop starts. Not much but /shrug

Intend to merge this later today, assuming you have no objections :)

@emilylange emilylange merged commit ea8474c into NixOS:master Dec 10, 2024
61 of 62 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Dec 10, 2024

Successfully created backport PR for release-24.05:

@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Dec 10, 2024

Successfully created backport PR for release-24.11:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.severity: security Issues which raise a security issue, or PRs that fix one 10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100 backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants