summary refs log tree commit diff stats
path: root/rust/format/package.nix
blob: 0595b61901a2946ec35c39291afeb103e50f8230 (plain) (blame)
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
{
  rustPlatform,
  lib,
}:
rustPlatform.buildRustPackage {
  pname = "format";
  version = "1.0.0";

  src = lib.cleanSourceWith {
    src = lib.cleanSource ./.;
    filter = name: type:
      (type == "directory")
      || (builtins.elem (builtins.baseNameOf name) [
        "Cargo.toml"
        "Cargo.lock"
        "prints.txt"
        "output_def.fs"
      ])
      || (lib.strings.hasSuffix ".rs" (builtins.baseNameOf name));
  };

  doCheck = true;

  cargoLock = {
    lockFile = ./Cargo.lock;
  };
}