Skip to content
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

emacs: teach elisp builders the finalAttrs pattern #330589

Merged
merged 9 commits into from
Aug 15, 2024

Commits on Aug 4, 2024

  1. emacs: fix name when pname is overridden

    Before
    
    nix-repl> (emacs.pkgs.magit.overrideAttrs (old: { pname = old.pname + "-patched"; })).name
    "emacs-magit-20240522.204"
    
    After
    
    nix-repl> (emacs.pkgs.magit.overrideAttrs (old: { pname = old.pname + "-patched"; })).name
    "emacs-magit-patched-20240522.204"
    jian-lin committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    3b82c96 View commit details
    Browse the repository at this point in the history
  2. emacs: remove redundant doCheck from genericBuild

    The default value of doCheck is false.
    jian-lin committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    675dcef View commit details
    Browse the repository at this point in the history
  3. emacs: handle propagatedBuildInputs correctly for genericBuild

    Without this patch, if there is propagatedBuildInputs in the arguments
    of genericBuild, it will override the value set by genericBuild.  With
    this patch applied, the argument and the value set by genericBuild are
    merged instead.
    jian-lin committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    cdf4aef View commit details
    Browse the repository at this point in the history
  4. emacs: stop generating autoload file for trivialBuild

    When Emacs starts, package-activate-all finds autoload files and
    loads them.  However, the autoload file generated by trivialBuild is
    never picked up by package-activate-all.  In other words, this feature
    never works.  So let's remove it.
    jian-lin committed Aug 4, 2024
    Configuration menu
    Copy the full SHA
    84c2e00 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2024

  1. 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'
    jian-lin committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    37df73d View commit details
    Browse the repository at this point in the history
  2. emacs: stop vendoring PR NixOS#234651

    Previously, we vendor PR NixOS#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 NixOS#234651.
    
    Considering that passing packageRequires to stdenv.mkDerivation also
    works well, we stop filtering it out and stop vendoring PR NixOS#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]: https://github.com/NixOS/nixpkgs/blob/f3834de3782b82bfc666abf664f946d0e7d1f116/pkgs/build-support/php/builders/v1/build-composer-project.nix#L108
    jian-lin committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    5248f6f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5805cf2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e64ccec View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    bdd7734 View commit details
    Browse the repository at this point in the history