mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
emacs: add overrides
option
This option enables overriding packages within the generated Emacs package set. Fixes #486
This commit is contained in:
parent
dc72aa2305
commit
e68d6e7924
1 changed files with 21 additions and 2 deletions
|
@ -6,8 +6,13 @@ let
|
||||||
|
|
||||||
cfg = config.programs.emacs;
|
cfg = config.programs.emacs;
|
||||||
|
|
||||||
# Copied from all-packages.nix.
|
# Copied from all-packages.nix, with modifications to support
|
||||||
emacsPackages = pkgs.emacsPackagesNgGen cfg.package;
|
# overrides.
|
||||||
|
emacsPackages =
|
||||||
|
let
|
||||||
|
epkgs = pkgs.emacsPackagesNgGen cfg.package;
|
||||||
|
in
|
||||||
|
epkgs.overrideScope' cfg.overrides;
|
||||||
emacsWithPackages = emacsPackages.emacsWithPackages;
|
emacsWithPackages = emacsPackages.emacsWithPackages;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -34,6 +39,20 @@ in
|
||||||
description = "Extra packages available to Emacs.";
|
description = "Extra packages available to Emacs.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
overrides = mkOption {
|
||||||
|
default = self: super: {};
|
||||||
|
defaultText = "self: super: {}";
|
||||||
|
example = literalExample ''
|
||||||
|
self: super: rec {
|
||||||
|
haskell-mode = self.melpaPackages.haskell-mode;
|
||||||
|
# ...
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Allows overriding packages within the Emacs package set.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
finalPackage = mkOption {
|
finalPackage = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
internal = true;
|
internal = true;
|
||||||
|
|
Loading…
Reference in a new issue