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,33 +6,35 @@ 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:
self: let
let
markBroken = pkg: pkg.override {
elpaBuild = args: self.elpaBuild (args // {
meta = (args.meta or {}) // { broken = true; };
});
};
imported = import ./elpa-generated.nix {
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" ];
elpaBuild = import ../../../build-support/emacs/elpa.nix {
inherit lib stdenv texinfo;
inherit (self) emacs;
};
markBroken = pkg: pkg.override {
elpaBuild = args: self.elpaBuild (args // {
meta = (args.meta or {}) // { broken = true; };
});
};
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 { }