forked from mirrors/nixpkgs
emacsWithPackages: add user documentation
This commit is contained in:
parent
9268f0e676
commit
0bc4af00ee
|
@ -1,3 +1,37 @@
|
|||
/*
|
||||
|
||||
# Usage
|
||||
|
||||
`emacsWithPackages` takes a single argument: a function from a package
|
||||
set to a list of packages (the packages that will be available in
|
||||
Emacs). For example,
|
||||
```
|
||||
emacsWithPackages (epkgs: [ epkgs.evil epkgs.magit ])
|
||||
```
|
||||
All the packages in the list should come from the provided package
|
||||
set. It is possible to add any package to the list, but the provided
|
||||
set is guaranteed to have consistent dependencies and be built with
|
||||
the correct version of Emacs.
|
||||
|
||||
# Overriding
|
||||
|
||||
`emacsWithPackages` inherits the package set which contains it, so the
|
||||
correct way to override the provided package set is to override the
|
||||
set which contains `emacsWithPackages`. For example, to override
|
||||
`emacsPackagesNg.emacsWithPackages`,
|
||||
```
|
||||
let customEmacsPackages =
|
||||
emacsPackagesNg.override (super: self: {
|
||||
# use a custom version of emacs
|
||||
emacs = ...;
|
||||
# use the unstable MELPA version of magit
|
||||
magit = self.melpaPackages.magit;
|
||||
});
|
||||
in customEmacsPackages.emacsWithPackages (epkgs: [ epkgs.evil epkgs.magit ])
|
||||
```
|
||||
|
||||
*/
|
||||
|
||||
{ lib, makeWrapper, stdenv }: self:
|
||||
|
||||
with lib; let inherit (self) emacs; in
|
||||
|
|
Loading…
Reference in a new issue