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
21
flake.nix
21
flake.nix
|
|
@ -19,9 +19,9 @@
|
||||||
{
|
{
|
||||||
formatter = forEachSystem (pkgs: pkgs.nixfmt-tree);
|
formatter = forEachSystem (pkgs: pkgs.nixfmt-tree);
|
||||||
|
|
||||||
devShells = forEachSystem (pkgs: {
|
devShells = forEachSystem (pkgs:
|
||||||
default = pkgs.mkShell {
|
let
|
||||||
packages = [
|
devTools = [
|
||||||
(pkgs.luajit.withPackages (
|
(pkgs.luajit.withPackages (
|
||||||
ps: with ps; [
|
ps: with ps; [
|
||||||
busted
|
busted
|
||||||
|
|
@ -32,7 +32,22 @@
|
||||||
pkgs.stylua
|
pkgs.stylua
|
||||||
pkgs.selene
|
pkgs.selene
|
||||||
pkgs.lua-language-server
|
pkgs.lua-language-server
|
||||||
|
];
|
||||||
|
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.plantuml
|
||||||
|
pkgs.mermaid-cli
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue