mirror of
https://github.com/nix-community/emacs-overlay.git
synced 2025-12-06 02:40:25 -08:00
Add emacsWithPackagesFromPackageRequires
This provides a mechanism for creating an Emacs closure that contains the runtime dependencies for a given Emacs package source file, by inspecting its Package-Requires header.
This commit is contained in:
parent
49597c2218
commit
8439afbe1e
5 changed files with 115 additions and 26 deletions
26
README.org
26
README.org
|
|
@ -28,8 +28,12 @@ We also provide two attributes named =emacsGit-nox= and =emacsUnstable-nox=
|
|||
if you wish to have Emacs built without X dependencies.
|
||||
|
||||
** Extra library functionality
|
||||
This overlay comes with an extra function to generate an Emacs closure from =use-package= declarations.
|
||||
This is an abstraction on top of =emacsWithPackages=.
|
||||
This overlay comes with extra functions to generate an Emacs closure
|
||||
from various types of dependency declaration. (These are abstractions
|
||||
on top of =emacsWithPackages=.)
|
||||
|
||||
For example, =emacsWithPackagesFromUsePackage= adds packages which are required in a user's config via =use-package=:
|
||||
|
||||
#+BEGIN_SRC nix
|
||||
{
|
||||
environment.systemPackages = [
|
||||
|
|
@ -52,6 +56,24 @@ This is an abstraction on top of =emacsWithPackages=.
|
|||
}
|
||||
#+END_SRC
|
||||
|
||||
Similarly, =emacsWithPackagesFromPackageRequires= adds packages which
|
||||
are declared in a =.el= package file's =Package-Requires= header, which
|
||||
can be handy for CI purposes:
|
||||
|
||||
#+BEGIN_SRC nix
|
||||
...
|
||||
let
|
||||
emacsForCI = pkgs.emacsWithPackagesFromPackageRequires {
|
||||
packageFile = builtins.readFile ./flycheck.el;
|
||||
extraEmacsPackages = epkgs: [
|
||||
epkgs.package-lint
|
||||
];
|
||||
};
|
||||
pkgs.mkShell {
|
||||
buildInputs = [ emacsForCI ];
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** Usage of the overlay
|
||||
*** Latest master each rebuild
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue