grapevine/nix/shell.nix
Charles Hall 9a5e552ca0
set up mdbook
This adds some new tools in CI for lint the book and also sets up
automated deployment to GitLab Pages. Also adds a readme that suggests
reading the book, since that's where all the information will be.
2024-06-16 20:23:18 -07:00

44 lines
924 B
Nix

# Keep sorted
{ default
, engage
, inputs
, jq
, lychee
, markdownlint-cli
, mdbook
, mkShell
, system
, toolchain
}:
mkShell {
env = default.env // {
# Rust Analyzer needs to be able to find the path to default crate
# sources, and it can read this environment variable to do so. The
# `rust-src` component is required in order for this to work.
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
};
# Development tools
nativeBuildInputs = [
# Always use nightly rustfmt because most of its options are unstable
#
# This needs to come before `toolchain` in this list, otherwise
# `$PATH` will have stable rustfmt instead.
inputs.fenix.packages.${system}.latest.rustfmt
# Keep sorted
engage
jq
lychee
markdownlint-cli
mdbook
toolchain
]
++
default.nativeBuildInputs
++
default.propagatedBuildInputs
++
default.buildInputs;
}