Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ let
if hook.settings.binPath == null
then "${hook.package}${binPath}"
else hook.settings.binPath;

texliveCombine = pkgs.texlive.combine (
lib.mergeAttrsList
(
map
(package: { ${package} = pkgs.texlive.${package}; })
(
builtins.filter
(hook: hooks.${hook}.enable)
[ "chktex" "lacheck" "latexindent" ]
)
)
// { inherit (pkgs.texlive) scheme-minimal; }
);
in
{
imports =
Expand Down Expand Up @@ -2228,7 +2242,7 @@ in
name = "chktex";
description = "LaTeX semantic checker";
types = [ "file" "tex" ];
package = tools.chktex;
package = texliveCombine;
entry = "${hooks.chktex.package}/bin/chktex";
};
clang-format =
Expand Down Expand Up @@ -2903,7 +2917,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
name = "latexindent";
description = "Perl script to add indentation to LaTeX files.";
types = [ "file" "tex" ];
package = tools.latexindent;
package = texliveCombine;
entry = "${hooks.latexindent.package}/bin/latexindent ${hooks.latexindent.settings.flags}";
};
lacheck =
Expand All @@ -2918,7 +2932,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
name = "lacheck";
description = "A consistency checker for LaTeX documents.";
types = [ "file" "tex" ];
package = tools.lacheck;
package = texliveCombine;
entry = "${script}";
};
lua-ls =
Expand Down
10 changes: 0 additions & 10 deletions nix/tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@
}:


let
tex = texlive.combine {
inherit (texlive) latexindent chktex scheme-basic;
};
in
{
clang-tools = llvmPackages_latest.clang-tools;
inherit
Expand Down Expand Up @@ -191,11 +186,6 @@ in
tflint = callPackage ./tflint { };
dune-build-opam-files = callPackage ./dune-build-opam-files { dune = dune_3; inherit (pkgsBuildBuild) ocaml; };
dune-fmt = callPackage ./dune-fmt { dune = dune_3; inherit (pkgsBuildBuild) ocaml; };
latexindent = tex;
lacheck = texlive.combine {
inherit (texlive) lacheck scheme-basic;
};
chktex = tex;
commitizen = commitizen.overrideAttrs (_: _: { doCheck = false; });
bats = if bats ? withLibraries then (bats.withLibraries (p: [ p.bats-support p.bats-assert p.bats-file ])) else bats;
git-annex = if stdenv.isDarwin then null else git-annex;
Expand Down