diff options
Diffstat (limited to '')
-rw-r--r-- | rust/format/package.nix | 27 |
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; + }; +} |