summary refs log tree commit diff stats
path: root/rust/format/package.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-29 23:57:32 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-29 23:57:32 +0100
commite0ca2d19231c50543a6dc6bcc6335a3f9a84c595 (patch)
treeaf4a581ebb6aacb456ea493a16a9934e01b5dcef /rust/format/package.nix
parentfix(src): Add some default stuff (diff)
downloadqmk_layout-e0ca2d19231c50543a6dc6bcc6335a3f9a84c595.zip
feat(src): Make usable
Diffstat (limited to 'rust/format/package.nix')
-rw-r--r--rust/format/package.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/rust/format/package.nix b/rust/format/package.nix
new file mode 100644
index 0000000..0595b61
--- /dev/null
+++ b/rust/format/package.nix
@@ -0,0 +1,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;
+  };
+}