build: split nix dev shell into default and presets
Problem: the single dev shell mixed dev tooling (linters, test runner) with preset compiler tools, causing heavy rebuilds (e.g. Chromium for `mermaid-cli`) for contributors who only need the dev tools. Solution: extract dev tooling into a shared `devTools` list and expose two shells — `default` for development and `presets` for running all built-in preset compilers (`typst`, `texliveMedium`, `tectonic`, `pandoc`, `asciidoctor`, `quarto`, `plantuml`, `mermaid-cli`).
This commit is contained in:
parent
23aa8acc55
commit
6f090fdcf3
1 changed files with 21 additions and 6 deletions
27
flake.nix
27
flake.nix
|
|
@ -19,9 +19,9 @@
|
|||
{
|
||||
formatter = forEachSystem (pkgs: pkgs.nixfmt-tree);
|
||||
|
||||
devShells = forEachSystem (pkgs: {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
devShells = forEachSystem (pkgs:
|
||||
let
|
||||
devTools = [
|
||||
(pkgs.luajit.withPackages (
|
||||
ps: with ps; [
|
||||
busted
|
||||
|
|
@ -32,9 +32,24 @@
|
|||
pkgs.stylua
|
||||
pkgs.selene
|
||||
pkgs.lua-language-server
|
||||
pkgs.plantuml
|
||||
];
|
||||
};
|
||||
});
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
packages = devTools;
|
||||
};
|
||||
presets = pkgs.mkShell {
|
||||
packages = devTools ++ [
|
||||
pkgs.typst
|
||||
pkgs.texliveMedium
|
||||
pkgs.tectonic
|
||||
pkgs.pandoc
|
||||
pkgs.asciidoctor
|
||||
pkgs.quarto
|
||||
pkgs.plantuml
|
||||
pkgs.mermaid-cli
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue