-
Notifications
You must be signed in to change notification settings - Fork 170
/
Copy pathtools.nix
203 lines (198 loc) · 4.06 KB
/
tools.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
{ stdenv
, lib
, actionlint
, alejandra
, ansible-lint
, biome
, cabal-fmt
, cabal-gild
, cabal2nix
, callPackage
, cargo
, checkmake
, clang-tools
, clippy
, cljfmt
, cmake-format
, commitizen
, conform
, convco
, crystal
, deadnix
, deno
, dhall
, dune_3
, eclint
, editorconfig-checker
, elixir
, elmPackages
, flake-checker ? null
, fprettify
, git-annex
, gptcommit ? null
, hadolint
, haskellPackages
, hindent
, hlint
, hpack
, html-tidy
, luaPackages
, lua-language-server
, lychee
, julia-bin
, mdl
, mdsh
, nil
, nixfmt
, nixpkgs-fmt
, nodePackages
, ocamlPackages
, opam
, ormolu
, pkgsBuildBuild
, poetry
, pre-commit-hook-ensure-sops ? null
, python3Packages
, pyright ? nodePackages.pyright
, php82Packages
, ripsecrets ? null
, reuse
, ruff ? null
, rustfmt
, shellcheck
, bats
, shfmt
, beautysh
, statix
, stylish-haskell
, stylua
, tagref
, taplo
, texlive
, topiary ? null ## Added in nixpkgs on Dec 2, 2022
, treefmt
, typos
, typstfmt
, typstyle ? null ## Add in nixpkgs added on commit 800ca60
, zprint
, yamlfmt
, yamllint
, go
, go-tools
, golangci-lint
, revive ? null
, vale
}:
let
tex = texlive.combine {
inherit (texlive) latexindent chktex scheme-basic;
};
in
{
inherit
actionlint
alejandra
ansible-lint
beautysh
biome
cabal2nix
cabal-fmt
cabal-gild
cargo
clang-tools
clippy
cljfmt
cmake-format
conform
convco
crystal
deadnix
deno
dhall
eclint
editorconfig-checker
elixir
flake-checker
fprettify
go
go-tools
golangci-lint
gptcommit
hadolint
hindent
hlint
hpack
html-tidy
lychee
julia-bin
mdl
mdsh
nil
nixfmt
nixpkgs-fmt
ormolu
pre-commit-hook-ensure-sops
poetry
pyright
reuse
revive
ripsecrets
ruff
rustfmt
shellcheck
shfmt
statix
stylish-haskell
stylua
tagref
taplo
topiary
treefmt
typos
typstfmt
typstyle
vale
yamlfmt
yamllint
zprint
;
inherit (elmPackages) elm-format elm-review elm-test;
# TODO: these two should be statically compiled
inherit (haskellPackages) fourmolu;
inherit (luaPackages) luacheck;
inherit (nodePackages) eslint markdownlint-cli prettier cspell;
inherit (ocamlPackages) ocp-indent;
inherit (python3Packages) autoflake black flake8 flynt isort mkdocs-linkcheck mypy pre-commit-hooks pylint pyupgrade;
inherit (php82Packages) php-cs-fixer psalm;
# FIXME: workaround build failure
phpstan = php82Packages.phpstan.overrideAttrs (old: {
composerStrictValidation = false;
});
# these two are for backwards compatibility
phpcbf = php82Packages.php-codesniffer or php82Packages.phpcbf;
phpcs = php82Packages.php-codesniffer or php82Packages.phpcs;
lua-language-server = lua-language-server;
purs-tidy = nodePackages.purs-tidy or null;
cabal2nix-dir = callPackage ./cabal2nix-dir { };
hpack-dir = callPackage ./hpack-dir { };
hunspell = callPackage ./hunspell { };
purty = callPackage ./purty { purty = nodePackages.purty; };
terraform-fmt = callPackage ./terraform-fmt { };
terraform-lint = callPackage ./terraform-lint { };
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;
# Note: Only broken in stable nixpkgs, works fine on latest master.
opam = if stdenv.isDarwin then null else opam;
## NOTE: `checkmake` 0.2.2 landed in nixpkgs on 12 April 2023. Once this gets
## into a NixOS release, the following code will be useless.
checkmake = if stdenv.isLinux || checkmake.version >= "0.2.2" then checkmake else null;
headache = callPackage ./headache { };
}