diff --git a/pkgs/applications/editors/emacs-modes/elpa-packages.nix b/pkgs/applications/editors/emacs-modes/elpa-packages.nix index 2312730ab0c1..5f0c863b5861 100644 --- a/pkgs/applications/editors/emacs-modes/elpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/elpa-packages.nix @@ -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 { }