emacs.pkgs: Propagate overriden scope to emacs package in set

This is the true fix for https://github.com/NixOS/nixpkgs/issues/130020.
This commit is contained in:
adisbladis 2021-08-04 09:13:46 -05:00
parent 1cc8723f0e
commit 9bd54f586e
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
2 changed files with 15 additions and 5 deletions

View file

@ -23951,8 +23951,8 @@ in
};
emacsPackagesFor = emacs: import ./emacs-packages.nix {
inherit (lib) makeScope makeOverridable;
inherit emacs;
inherit (lib) makeScope makeOverridable dontRecurseIntoAttrs;
emacs' = emacs;
pkgs' = pkgs; # default pkgs used for bootstrapping the emacs package set
};

View file

@ -21,7 +21,12 @@
(package-initialize)
*/
{ pkgs', makeScope, makeOverridable, emacs }:
{ pkgs'
, emacs'
, makeScope
, makeOverridable
, dontRecurseIntoAttrs
}:
let
@ -71,7 +76,12 @@ in makeScope pkgs'.newScope (self: makeOverridable ({
// manualPackages // { inherit manualPackages; }
// {
inherit emacs;
# Propagate overriden scope
emacs = emacs'.overrideAttrs(old: {
passthru = old.passthru // {
pkgs = dontRecurseIntoAttrs self;
};
});
trivialBuild = pkgs.callPackage ../build-support/emacs/trivial.nix {
inherit (self) emacs;
@ -84,7 +94,7 @@ in makeScope pkgs'.newScope (self: makeOverridable ({
emacsWithPackages = emacsWithPackages { inherit pkgs lib; } self;
withPackages = emacsWithPackages { inherit pkgs lib; } self;
}// {
} // {
# Package specific priority overrides goes here