mirror of
https://github.com/nix-community/nix-doom-emacs
synced 2025-08-03 12:27:27 -05:00
hmModule: emacsPackagesOverlay
option
This commit is contained in:
@ -3,6 +3,12 @@
|
|||||||
let
|
let
|
||||||
cfg = config.programs.doom-emacs;
|
cfg = config.programs.doom-emacs;
|
||||||
inherit (lib) literalExample mkEnableOption mkIf mkOption types;
|
inherit (lib) literalExample mkEnableOption mkIf mkOption types;
|
||||||
|
overlayType = lib.mkOptionType {
|
||||||
|
name = "overlay";
|
||||||
|
description = "Emacs packages overlay";
|
||||||
|
check = lib.isFunction;
|
||||||
|
merge = lib.mergeOneOption;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.doom-emacs = {
|
options.programs.doom-emacs = {
|
||||||
@ -51,6 +57,24 @@ in
|
|||||||
default = pkgs.emacs;
|
default = pkgs.emacs;
|
||||||
example = literalExample "pkgs.emacs";
|
example = literalExample "pkgs.emacs";
|
||||||
};
|
};
|
||||||
|
emacsPackagesOverlay = mkOption {
|
||||||
|
description = ''
|
||||||
|
Overlay to customize emacs (elisp) dependencies.
|
||||||
|
|
||||||
|
As inputs are gathered dynamically, this is the only way to hook into
|
||||||
|
package customization.
|
||||||
|
'';
|
||||||
|
type = with types; overlayType;
|
||||||
|
default = self: super: { };
|
||||||
|
defaultText = "self: super { }";
|
||||||
|
example = literalExample ''
|
||||||
|
self: super: {
|
||||||
|
magit-delta = super.magit-delta.overrideAttrs (esuper: {
|
||||||
|
buildInputs = esuper.buildInputs ++ [ pkgs.git ];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
};
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
};
|
};
|
||||||
@ -61,7 +85,7 @@ in
|
|||||||
emacs = pkgs.callPackage self {
|
emacs = pkgs.callPackage self {
|
||||||
extraPackages = (epkgs: cfg.extraPackages);
|
extraPackages = (epkgs: cfg.extraPackages);
|
||||||
emacsPackages = pkgs.emacsPackagesFor cfg.emacsPackage;
|
emacsPackages = pkgs.emacsPackagesFor cfg.emacsPackage;
|
||||||
inherit (cfg) doomPrivateDir extraConfig;
|
inherit (cfg) doomPrivateDir extraConfig emacsPackagesOverlay;
|
||||||
dependencyOverrides = inputs;
|
dependencyOverrides = inputs;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
Reference in New Issue
Block a user