Commit Graph

2 Commits

Author SHA1 Message Date
Lin Jian
5248f6f8ef
emacs: stop vendoring PR #234651
Previously, we vendor PR #234651 because we want to keep the old
behavior of filtering out packageRequires from the arguments we pass
to the underling stdenv.mkDerivation.  Doing so raises the concern
about the complexity of PR #234651.

Considering that passing packageRequires to stdenv.mkDerivation also
works well, we stop filtering it out and stop vendoring PR #234651.

Now, this PR only uses the existing interface of stdenv.mkDerivation.
Even though the name of the build helper is still extendMkDerivation',
it is nothing new and has been used in Nixpkgs, such as
php.buildComposerProject[1].

[1]: f3834de378/pkgs/build-support/php/builders/v1/build-composer-project.nix (L108)
2024-08-05 08:12:39 +08:00
Lin Jian
37df73d3d8
emacs: teach elisp builders the finalAttrs pattern
This commit causes 0 rebuilds.

The performance overhead of eval time is as follows:

|       package set        | before | after | changed |
|--------------------------|--------|-------|---------|
| emacs.pkgs.elpaPackages  |  1.925 | 1.935 | +0.35%  |
| emacs.pkgs.melpaPackages |  8.312 | 8.558 | +3.0%   |

The commands used here are

nix nixpkgs#hyperfine -- --warmup 2 --runs 10 'NIXPKGS_ALLOW_BROKEN=1 nix eval --include nixpkgs=$PWD --file . emacs.pkgs.melpaPackages --apply \'pkgSet: map (drv: drv.drvPath) (builtins.filter (p: p.type or null == "derivation") (builtins.attrValues pkgSet))\' --no-eval-cache >/dev/null'

nix nixpkgs#hyperfine -- --warmup 10 --runs 30 'NIXPKGS_ALLOW_BROKEN=1 nix eval --include nixpkgs=$PWD --file . emacs.pkgs.elpaPackages --apply \'pkgSet: map (drv: drv.drvPath) (builtins.filter (p: p.type or null == "derivation") (builtins.attrValues pkgSet))\' --no-eval-cache >/dev/null'
2024-08-05 08:05:45 +08:00