mio-ops/profiles/emacs.nix

34 lines
1.1 KiB
Nix
Raw Normal View History

2021-11-16 04:57:23 +00:00
/* This is a nix expression to build Emacs and some Emacs packages I like
from source on any distribution where Nix is installed. This will install
all the dependencies from the nixpkgs repository and build the binary files
without interfering with the host distribution.
2020-01-21 15:42:58 +00:00
2021-11-16 04:57:23 +00:00
To build the project, type the following from the current directory:
2020-01-21 15:42:58 +00:00
2021-11-16 04:57:23 +00:00
$ nix-build emacs.nix
2020-01-21 15:42:58 +00:00
2021-11-16 04:57:23 +00:00
To run the newly compiled executable:
2020-01-21 15:42:58 +00:00
2021-11-16 04:57:23 +00:00
$ ./result/bin/emacs
2020-01-21 15:42:58 +00:00
*/
2021-11-16 04:57:23 +00:00
{ pkgs ? import <nixpkgs> { } }:
2020-01-21 15:42:58 +00:00
let
2021-11-16 04:57:23 +00:00
myEmacs = pkgs.emacs;
emacsWithPackages = (pkgs.emacsPackagesNgGen myEmacs).emacsWithPackages;
in emacsWithPackages (epkgs:
(with epkgs.melpaStablePackages; [
magit # ; Integrate git <C-x g>
2020-01-21 15:42:58 +00:00
zerodark-theme # ; Nicolas' theme
2021-11-16 04:57:23 +00:00
]) ++ (with epkgs.melpaPackages;
[
#undo-tree # ; <C-x u> to show the undo tree
#zoom-frm # ; increase/decrease font size for all buffers %lt;C-x C-+>
]) ++ (with epkgs.elpaPackages; [
auctex # ; LaTeX mode
beacon # ; highlight my cursor when scrolling
nameless # ; hide current package name everywhere in elisp code
]) ++ [
pkgs.notmuch # From main packages set
])