summary refs log tree commit diff
path: root/release/checks/rustfmt.nix
blob: 7e38d9f1fb7b506bd5e4ce18cf3b1c7b27faa138 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2022 Unikie

import ../../lib/eval-config.nix ({ config, src, ... }:
config.pkgs.callPackage ({ runCommand, rustfmt }:

runCommand "spectrum-rustfmt" {
  inherit src;
  nativeBuildInputs = [ rustfmt ];
} ''
  shopt -s globstar
  rustfmt --check $src/**/*.rs
  touch $out
'') { })