Using `.extend` function causes nix to not cache the evaluation of a package (`a.extend {} != a.extend {}` ). In effect this meant that every time we used
```
gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
settings.target = config.platform.host;
};
binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
settings.target = config.platform.host;
};
```
we were performing full re-evaluations of binutils and gcc. To make this worse, since binutils and gcc depend on other binutils and gcc (sometimes with this `.extend`), the amount of evaluations would start to blow up.
Before this patch evaluating `packages.foundation.gcc.latest.packages.x86_64-linux.x86_64-linux.package` would evaluate `binutils` stage1 139 times, after this patch (and before target patch) it's 4.
Reviewed-on: #40
Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Co-committed-by: Victor Fuentes <vlinkz@snowflakeos.org>
|
||
|---|---|---|
| .. | ||
| builders | ||
| lib | ||
| mirrors | ||
| packages | ||