diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2018-02-06 21:22:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 21:22:23 +0000 |
commit | 8eba2a5be88a2e1ccac968b5b7392951d4924d30 (patch) | |
tree | 9faffa2f5dd70aac76a967196852885338ff1246 /doc/package-notes.xml | |
parent | 1137ba5a732f50059d8becdcd34877df524d1d80 (diff) | |
parent | 5ce0f5aa38477a5d7700bdb1f086c328d826f2b5 (diff) |
Merge pull request #31312 from binarin/emacs-package-set-overrides
emacs-packages: Cleanup and document for overrides
Diffstat (limited to 'doc/package-notes.xml')
-rw-r--r-- | doc/package-notes.xml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/package-notes.xml b/doc/package-notes.xml index b657f5809db96..2d6c87c3d07a8 100644 --- a/doc/package-notes.xml +++ b/doc/package-notes.xml @@ -660,6 +660,32 @@ cp ${myEmacsConfig} $out/share/emacs/site-lisp/default.el passing <command>-q</command> to the Emacs command. </para> +<para> + Sometimes <varname>emacsWithPackages</varname> is not enough, as + this package set has some priorities imposed on packages (with + the lowest priority assigned to Melpa Unstable, and the highest for + packages manually defined in + <filename>pkgs/top-level/emacs-packages.nix</filename>). But you + can't control this priorities when some package is installed as a + dependency. You can override it on per-package-basis, providing all + the required dependencies manually - but it's tedious and there is + always a possibility that an unwanted dependency will sneak in + through some other package. To completely override such a package + you can use <varname>overrideScope</varname>. +</para> + +<screen> +overrides = super: self: rec { + haskell-mode = self.melpaPackages.haskell-mode; + ... +}; +((emacsPackagesNgGen emacs).overrideScope overrides).emacsWithPackages (p: with p; [ + # here both these package will use haskell-mode of our own choice + ghc-mod + dante +]) +</screen> + </section> </section> |