mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
ci/eval: reduce closure size
`procps` pulls in 180 MB of systemd, but busybox also provides `kill`. `busybox` also ships `time`, so no need for that extra dependency. Using `nativeBuildInputs` pulls in all the -dev outputs of the listed packages - which we don't need. We only need to run these tools, thus map to their bin outputs. Brings down the closure size from 500+ MB to 193 MB for the Eval job. This probably saves ~10 seconds for the job.
This commit is contained in:
@@ -122,7 +122,8 @@ let
|
||||
in
|
||||
runCommand "compare"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
# Don't depend on -dev outputs to reduce closure size for CI.
|
||||
nativeBuildInputs = map lib.getBin [
|
||||
jq
|
||||
(python3.withPackages (
|
||||
ps: with ps; [
|
||||
|
||||
@@ -14,10 +14,9 @@
|
||||
runCommand,
|
||||
writeShellScript,
|
||||
symlinkJoin,
|
||||
time,
|
||||
procps,
|
||||
nix,
|
||||
busybox,
|
||||
jq,
|
||||
nix,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -48,9 +47,10 @@ let
|
||||
runCommand "attrpaths-superset.json"
|
||||
{
|
||||
src = nixpkgs;
|
||||
nativeBuildInputs = [
|
||||
# Don't depend on -dev outputs to reduce closure size for CI.
|
||||
nativeBuildInputs = map lib.getBin [
|
||||
busybox
|
||||
nix
|
||||
time
|
||||
];
|
||||
}
|
||||
''
|
||||
@@ -131,11 +131,11 @@ let
|
||||
in
|
||||
runCommand "nixpkgs-eval-${evalSystem}"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
nix
|
||||
time
|
||||
procps
|
||||
# Don't depend on -dev outputs to reduce closure size for CI.
|
||||
nativeBuildInputs = map lib.getBin [
|
||||
busybox
|
||||
jq
|
||||
nix
|
||||
];
|
||||
env = {
|
||||
inherit evalSystem chunkSize;
|
||||
@@ -206,7 +206,8 @@ let
|
||||
}:
|
||||
runCommand "combined-eval"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
# Don't depend on -dev outputs to reduce closure size for CI.
|
||||
nativeBuildInputs = map lib.getBin [
|
||||
jq
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user