emacs-packages: Make elpa generated file overrideable

This commit is contained in:
adisbladis 2019-08-18 10:47:42 +01:00
parent eacc71a6b6
commit ee80e10a98
No known key found for this signature in database
GPG Key ID: 110BFAD44C6249B7

View File

@ -6,26 +6,13 @@ To update the list of packages from MELPA,
1. Run `./update-elpa`.
2. Check for evaluation errors: `nix-instantiate ../../../.. -A emacsPackagesNg.elpaPackages`.
3. `git commit -m "elpa-packages $(date -Idate) -- elpa-generated.nix"`
3. `git commit -m "elpa-packages $(date -Idate)" -- elpa-generated.nix`
*/
{ lib, stdenv, texinfo }:
self:
let
imported = import ./elpa-generated.nix {
inherit (self) callPackage;
};
super = removeAttrs imported [ "dash" ];
elpaBuild = import ../../../build-support/emacs/elpa.nix {
inherit lib stdenv texinfo;
inherit (self) emacs;
};
self: let
markBroken = pkg: pkg.override {
elpaBuild = args: self.elpaBuild (args // {
@ -33,6 +20,21 @@ self:
});
};
elpaBuild = import ../../../build-support/emacs/elpa.nix {
inherit lib stdenv texinfo;
inherit (self) emacs;
};
generateElpa = lib.makeOverridable ({
generated ? ./elpa-generated.nix
}: let
imported = import generated {
inherit (self) callPackage;
};
super = removeAttrs imported [ "dash" ];
overrides = {
# upstream issue: missing footer
ebdb-i18n-chn = markBroken super.ebdb-i18n-chn;
@ -48,4 +50,6 @@ self:
elpaPackages = super // overrides;
in elpaPackages // { inherit elpaBuild; }
in elpaPackages // { inherit elpaBuild; });
in generateElpa { }