···
The list of available packages in the various ELPA repositories can be seen
with the following commands:
-
<example xml:id="module-services-emacs-querying-packages">
-
<title>Querying Emacs packages</title>
<programlisting><![CDATA[
nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.elpaPackages
nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.melpaPackages
nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.melpaStablePackages
nix-env -f "<nixpkgs>" -qaP -A emacs.pkgs.orgPackages
···
adding it to the list of system packages (see
<xref linkend="sec-declarative-package-mgmt" />). Simply modify your file
<filename>configuration.nix</filename> to make it contain:
-
<example xml:id="module-services-emacs-configuration-nix">
-
<title>Custom Emacs in <filename>configuration.nix</filename></title>
<programlisting><![CDATA[
environment.systemPackages = [
···
···
<filename>~/.config/nixpkgs/config.nix</filename> (see
<link xlink:href="https://nixos.org/nixpkgs/manual/#sec-modify-via-packageOverrides">Nixpkgs
-
<example xml:id="module-services-emacs-config-nix">
-
<title>Custom Emacs in <filename>~/.config/nixpkgs/config.nix</filename></title>
<programlisting><![CDATA[
packageOverrides = super: let self = super.pkgs; in {
···
···
<filename>emacs.nix</filename> in this way:
-
<example xml:id="ex-emacsGtk3Nix">
-
<title>Custom Emacs build</title>
<programlisting><![CDATA[
{ pkgs ? import <nixpkgs> {} }:
···
After building this file as shown in <xref linkend="ex-emacsNix" />, you
···
The Emacs init file should be changed to load the extension packages at
-
<example xml:id="module-services-emacs-package-initialisation">
-
<title>Package initialization in <filename>.emacs</filename></title>
<programlisting><![CDATA[
···
(setq package-enable-at-startup nil)
···
Then customize the variable <varname>rng-schema-locating-files</varname> to
include <filename>~/.emacs.d/schemas.xml</filename> and put the following
-
<example xml:id="ex-emacs-docbook-xml">
-
<title>nXML Schema Configuration (<filename>~/.emacs.d/schemas.xml</filename>)</title>
<programlisting language="xml"><![CDATA[
···