dotfiles.nix/home-manager/profiles/willem/programs/emacs/tex.nix
willemml a7c69788b0
Fixes TeX module for Emacs
Adds support for changing the org and tex config file path. Also makes
extra packages needed by org and tex customizable outside of the
module definition.

Additionally this makes the launchd service for Emacs on darwin use
the finalPackge output instead of package. This improves compatibility
with existing home-manager modules as well as my additions for
controlling whether or not org and tex are configured.
2023-11-08 14:54:48 -08:00

97 lines
1.8 KiB
Nix

{
pkgs,
lib,
...
}: {
programs.emacs = {
orgTexConfigFile = ./org-tex-cfg.el;
enableOrgTex = lib.mkDefault true;
texEmacsPackages = epkgs: (let
org-auctex = epkgs.trivialBuild rec {
pname = "org-auctex";
version = "e1271557b9f36ca94cabcbac816748e7d0dc989c";
buildInputs = [epkgs.auctex];
src = pkgs.fetchFromGitHub {
owner = "karthink";
repo = pname;
rev = version;
sha256 = "sha256-cMAhwybnq5HA1wOaUqDPML3nnh5m1iwEETTPWqPbAvw=";
};
};
in (with epkgs; [
org-auctex
auctex
cdlatex
citeproc
graphviz-dot-mode
ivy-bibtex
gnuplot
htmlize
org-auctex
org-contrib
org-download
pdf-tools
plantuml-mode
]));
texPackages = let
aspellPackage = pkgs.aspellWithDicts (d: [d.en d.en-science d.en-computers d.fr]);
texliveset = pkgs.texlive.combine {
inherit
(pkgs.texlive)
scheme-basic
babel
amscls
amsmath
biber
biblatex
biblatex-mla
block
cancel
caption
capt-of
csquotes
enotez
enumitem
etex
etoolbox
fancyhdr
float
fontaxes
graphics
hanging
hyperref
latex
latexindent
latexmk
logreq
metafont
mlacls
newtx
pdflscape
pdfpages
preprint
psnfss
ragged2e
titlesec
tools
translations
ulem
url
wrapfig
xstring
xkeyval
;
};
in
with pkgs; [
texliveset
aspellPackage
gnuplot
plantuml
];
};
}