From 23792815322e690326e5137ee0664a49fe0ac0b7 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sat, 13 May 2023 16:13:51 -0400 Subject: [PATCH] Add readme --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..dbb3210 --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +# Nix Flakes Rust Helper + +A helper flake for automatically generating flake contents for rust projects, including building, +testing, documenting, auditing, and linting of rust projects, as well as other useful toolchain +packages + +## Provided toolchain + +### DevShell + +The provided devShell includes the following rust specific packages, in addition to the usual rust +toolchain (including rust-analyzer): + +- [`cargo-llvm-cov`](https://crates.io/crates/cargo-llvm-cov) +- [`cargo-nextest`](https://crates.io/crates/cargo-nextest) +- [`cargo-udeps`](https://crates.io/crates/cargo-udeps) +- [`cargo-audit`](https://crates.io/crates/cargo-audit) +- [`cargo-release`](https://crates.io/crates/cargo-release) +- [`cargo-deny`](https://crates.io/crates/cargo-deny) + +These general workflow utilities are provided: +- [`gnuplot`](http://www.gnuplot.info/) +- [`pre-commit`](https://pre-commit.com/) +- [`git-lfs`](https://git-lfs.com/) +- [`git-cliff`](https://git-cliff.org/) +- [`nixfmt`](https://github.com/serokell/nixfmt) +- [`mdformat`](https://mdformat.readthedocs.io/en/stable/) + +### Dependencies + +The following dependencies are provided by default: +- `cmake` +- `openssl` +- `pkg-config` + +## Usage + +### Repository with a single crate (not a workspace) + +Create a `flake.nix` in the root of the repository with the following contents: + +``` nix +{ + inputs = { rust = { url = "./.."; }; }; + description = "Simple Test Package"; + + outputs = { self, nixpkgs, rust }: + rust.single { + crateName = "CRATE_NAME"; + src = ./.; + }; +} +``` + +Optionally create a `.envrc` in the root of the repository with the following contents: + +``` nix +use flake +```