mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 15:13:56 +02:00

```shell $ nix run .#fmt ``` does all the automatic formatting the CI checks for. Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
28 lines
466 B
Nix
28 lines
466 B
Nix
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright (c) 2024 Matter Labs
|
|
{ lib
|
|
, pkgs
|
|
, teepot
|
|
, ...
|
|
}:
|
|
pkgs.writeShellApplication {
|
|
name = "fmt-teepot";
|
|
|
|
runtimeInputs = with pkgs;
|
|
[ nixpkgs-fmt coreutils taplo ]
|
|
++ teepot.teepot.nativeBuildInputs;
|
|
|
|
text = ''
|
|
# .nix
|
|
echo "* Formatting nix files"
|
|
nixpkgs-fmt .
|
|
|
|
# .toml
|
|
echo "* Formatting toml files"
|
|
taplo fmt
|
|
|
|
# .rs
|
|
echo "* Formatting rust files"
|
|
cargo fmt
|
|
'';
|
|
}
|