mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
I like to put a bunch of untracked stuff in a /scratch directory for each project, and then puth /scratch in my global gitignore. There are usually some markdown notes files in here that I don't care about style for. The previous markdownlint invokation didn't respect the global gitignore, making local 'engage' runs kinda useless due to false positives from the scratch dir.
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
# Keep sorted
|
|
{ cargo-insta
|
|
, default
|
|
, engage
|
|
, findutils
|
|
, inputs
|
|
, jq
|
|
, lychee
|
|
, markdownlint-cli
|
|
, mdbook
|
|
, mkShell
|
|
, ripgrep
|
|
, stdenv
|
|
, 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.${stdenv.buildPlatform.system}.latest.rustfmt
|
|
|
|
# Keep sorted
|
|
cargo-insta
|
|
engage
|
|
findutils
|
|
jq
|
|
lychee
|
|
markdownlint-cli
|
|
mdbook
|
|
ripgrep
|
|
toolchain
|
|
]
|
|
++
|
|
default.nativeBuildInputs
|
|
++
|
|
default.propagatedBuildInputs
|
|
++
|
|
default.buildInputs;
|
|
|
|
shellHook = ''
|
|
# Workaround for <https://github.com/NixOS/nix/issues/8355>
|
|
unset TMPDIR
|
|
'';
|
|
}
|