mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 01:02:20 +00:00
719f023f33ccd35ae80ed861bf46136d5ebe1a8d
time and space on the new (non-ATerm) Nix expression evaluator. It
turns out that release.nix relied rather heavily on maximal laziness
for efficiency: every job calls `allPackages { inherit system; }'
for each platform. This causes the dependencies of the job to be
reevaluated for every job/platform combination. This is very slow
and (because the evaluator doesn't have a garbage collector yet)
eventually causes the evaluator to run out of memory and be killed.
As a workaround, I've replaced the calls to `allPackages' with a
quasi-memoised `pkgsFor' function. It "caches" the result by going
through a variable such as `pkgs_x86_64_linux', which is evaluated
only once. Evaluation now only takes 4.4s and 545 MiB on my
machine.
A cleaner solution may be to move the `system' argument outwards so
that entire set of jobs is called only once for each value of
`system'.
svn path=/nixpkgs/trunk/; revision=21966
Description
Languages
Nix
94.8%
Shell
2.1%
Python
1.9%
Rust
0.3%
Perl
0.2%
Other
0.3%