File tree 2 files changed +26
-3
lines changed
2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env sh
2
2
3
- nix run github:kamadorueda/alejandra -- -q " $@ "
3
+ set -eux
4
+
5
+ if ! command -v nix-build; then
6
+ echo ' ERROR: this pre-commit hook requires "nix-build" to be installed first'
7
+ exit 1
8
+ fi
9
+
10
+ if ! command -v nix-instantiate; then
11
+ echo ' ERROR: this pre-commit hook requires "nix-instantiate" to be installed first'
12
+ exit 1
13
+ fi
14
+
15
+ echo INFO: computing current system
16
+ system=" $( nix-instantiate --eval --expr builtins.currentSystem) "
17
+
18
+ echo INFO: building Alejandra
19
+
20
+ nix-build \
21
+ --attr ${system} \
22
+ --out-link result-alejandra \
23
+ https://github.com/kamadorueda/alejandra/tarball/1.2.0
24
+
25
+ echo INFO: running Alejandra:
26
+ result-alejandra/bin/alejandra -- -q " ${@ } "
Original file line number Diff line number Diff line change @@ -269,8 +269,7 @@ Thank you ❤️
269
269
270
270
- [ Kevin Amado] ( https://github.com/kamadorueda ) ~
271
271
[ Email
] ( mailto:[email protected] ) ,
272
- [ Patreon] ( https://www.patreon.com/kamadorueda ) ,
273
- @kamadorueda :[ matrix.org] ( https://matrix.org/ ) .
272
+ [ Patreon] ( https://www.patreon.com/kamadorueda ) .
274
273
- [ Thomas Bereknyei] ( https://github.com/tomberek ) .
275
274
- [ Piegames] ( https://github.com/piegamesde ) .
276
275
- [ Joachim Ernst] ( https://github.com/0x4A6F ) .
@@ -282,6 +281,7 @@ Thank you ❤️
282
281
- [ Rehno Lindeque] ( https://github.com/rehno-lindeque ) .
283
282
- [ Jörg Thalheim] ( https://github.com/Mic92 ) .
284
283
- [ Vincent Ambo] ( https://github.com/tazjin ) .
284
+ - [ Loïc Reynier] ( https://github.com/loicreynier ) .
285
285
- [ Mr Hedgehog] ( https://github.com/ModdedGamers ) .
286
286
- [ Tristan Maat] ( https://github.com/TLATER ) .
287
287
- [ Norbert Melzer] ( https://github.com/NobbZ ) .
You can’t perform that action at this time.
0 commit comments