summary refs log tree commit diff stats
path: root/rust/qmk-hid-com/package.nix
blob: 157e92e803064d9d066f40d9eb01937239e28199 (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
{
  rustPlatform,
  lib,
}:
rustPlatform.buildRustPackage {
  pname = "qmk-hid-com";
  version = "1.0.0";

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

  doCheck = true;

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