forked from mirrors/nixpkgs
emacs-packages: Add overriding capability to emacsPackagesNg
This allows overriding the individual package sets composing emacsPackagesNg. Example: ``` myEmacsPackages = emacsPackagesNg.override { melpaPackages = {}; }; ```
This commit is contained in:
parent
d490bcdf0f
commit
97a069609f
|
@ -50,4 +50,4 @@ self:
|
||||||
|
|
||||||
elpaPackages = super // overrides;
|
elpaPackages = super // overrides;
|
||||||
|
|
||||||
in elpaPackages // { inherit elpaBuild elpaPackages; }
|
in elpaPackages // { inherit elpaBuild; }
|
||||||
|
|
|
@ -28,4 +28,4 @@ self:
|
||||||
|
|
||||||
orgPackages = super // overrides;
|
orgPackages = super // overrides;
|
||||||
|
|
||||||
in orgPackages // { inherit orgPackages; }
|
in orgPackages
|
||||||
|
|
|
@ -46,7 +46,7 @@ with lib.licenses;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
elpaPackages = import ../applications/editors/emacs-modes/elpa-packages.nix {
|
mkElpaPackages = import ../applications/editors/emacs-modes/elpa-packages.nix {
|
||||||
inherit lib stdenv texinfo;
|
inherit lib stdenv texinfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,28 +54,16 @@ let
|
||||||
melpaGeneric = import ../applications/editors/emacs-modes/melpa-packages.nix {
|
melpaGeneric = import ../applications/editors/emacs-modes/melpa-packages.nix {
|
||||||
inherit external lib pkgs;
|
inherit external lib pkgs;
|
||||||
};
|
};
|
||||||
|
mkMelpaStablePackages = melpaGeneric "stable";
|
||||||
|
mkMelpaPackages = melpaGeneric "unstable";
|
||||||
|
|
||||||
melpaStablePackages = self: let
|
mkOrgPackages = import ../applications/editors/emacs-modes/org-packages.nix { };
|
||||||
m = melpaGeneric "stable" self;
|
|
||||||
in {melpaStablePackages = m;} // m;
|
|
||||||
|
|
||||||
melpaPackages = self: let
|
|
||||||
m = melpaGeneric "unstable" self;
|
|
||||||
in {melpaPackages = m;} // m;
|
|
||||||
|
|
||||||
orgPackages = import ../applications/editors/emacs-modes/org-packages.nix { };
|
|
||||||
|
|
||||||
emacsWithPackages = import ../build-support/emacs/wrapper.nix {
|
emacsWithPackages = import ../build-support/emacs/wrapper.nix {
|
||||||
inherit lib lndir makeWrapper stdenv runCommand;
|
inherit lib lndir makeWrapper stdenv runCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
packagesFun = self: with self; {
|
mkManualPackages = self: with self; {
|
||||||
|
|
||||||
inherit emacs melpaBuild trivialBuild;
|
|
||||||
|
|
||||||
emacsWithPackages = emacsWithPackages self;
|
|
||||||
|
|
||||||
## START HERE
|
|
||||||
|
|
||||||
elisp-ffi = melpaBuild rec {
|
elisp-ffi = melpaBuild rec {
|
||||||
pname = "elisp-ffi";
|
pname = "elisp-ffi";
|
||||||
|
@ -221,11 +209,20 @@ let
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
in lib.makeScope newScope (self:
|
in lib.makeScope newScope (self: lib.makeOverridable ({
|
||||||
removeAttrs ({}
|
elpaPackages ? mkElpaPackages self
|
||||||
// elpaPackages self
|
, melpaStablePackages ? mkMelpaStablePackages self
|
||||||
// melpaStablePackages self
|
, melpaPackages ? mkMelpaPackages self
|
||||||
// melpaPackages self
|
, orgPackages ? mkOrgPackages self
|
||||||
// orgPackages self
|
, manualPackages ? mkManualPackages self
|
||||||
// packagesFun self) [ "override" "overrideDerivation" ]
|
}: ({}
|
||||||
)
|
// elpaPackages // { inherit elpaPackages; }
|
||||||
|
// melpaStablePackages // { inherit melpaStablePackages; }
|
||||||
|
// melpaPackages // { inherit melpaPackages; }
|
||||||
|
// orgPackages // { inherit orgPackages; }
|
||||||
|
// manualPackages
|
||||||
|
// {
|
||||||
|
inherit emacs melpaBuild trivialBuild;
|
||||||
|
emacsWithPackages = emacsWithPackages self;
|
||||||
|
})
|
||||||
|
) {})
|
||||||
|
|
Loading…
Reference in a new issue