refactor(emacs): use plex-latex from sydpkgs

This commit is contained in:
2025-12-20 13:59:27 -07:00
parent 3bb8d7934c
commit 30a7c669b3

View File

@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, inputs, ... }:
let cfg = config.sydnix.users.msyds.emacs.plex-latex;
in {
@@ -7,40 +7,9 @@ in {
};
config = lib.mkIf cfg.enable {
sydnix.emacs.tex.extraTexPackages =
let syd-plex = pkgs.stdenvNoCC.mkDerivation (final: {
pname = "syd-plex-latex";
version = "1.0.0";
src = ./plex-latex;
nativeBuildInputs = [ pkgs.texlive.combined.scheme-small ];
passthru = {
pkgs = [ final.finalPackage ];
tlDeps = with pkgs.texlive; [
plex
plex-otf
fontaxes
unicode-math
xetex
];
tlType = "run";
};
installPhase = ''
runHook preInstall
dir="$out/tex/latex/syd-plex"
mkdir -p "$dir"
mv syd-plex.sty "$dir"
runHook postInstall
'';
});
in {
inherit syd-plex;
inherit (pkgs.texlive)
plex
plex-otf
fontaxes
unicode-math
xetex
;
};
sydnix.sydpkgs.overlay.enable = true;
sydnix.emacs.tex.extraTexPackages = {
inherit (pkgs) syd-plex-latex;
};
};
}