Nathan McCarty 39ecba2214 | ||
---|---|---|
sources | ||
test-crate | ||
.gitignore | ||
LICENSE | ||
README.md | ||
flake.lock | ||
flake.nix | ||
update.sh |
README.md
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):
These general workflow utilities are provided:
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:
{
inputs = { rust = { url = "git+https://git.stranger.systems/nix/Rust"; }; };
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:
use flake