-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Conversation
6bf77ff
to
b0873cb
Compare
There was a problem hiding this 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; ", |
There was a problem hiding this comment.
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 :)
nixpkgs/pkgs/applications/networking/browsers/chromium/update.mjs
Lines 93 to 95 in c2a355e
if (value.url === 'https://chromium.googlesource.com/chromium/src.git') { | |
value.recompress = true | |
} |
"recompress": true |
nixpkgs/pkgs/applications/networking/browsers/chromium/common.nix
Lines 154 to 170 in 878ced9
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; |
nixpkgs/pkgs/applications/networking/browsers/chromium/common.nix
Lines 172 to 186 in 878ced9
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)
|
Successfully created backport PR for |
Successfully created backport PR for |
Built on x86_64-linux:
-bin
variantsThings done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.