nixos-config/shells/rust.nix

36 lines
589 B
Nix
Raw Normal View History

2021-12-26 09:33:00 +00:00
# This is just for a quick development setup. Otherwise, I recommend
# to use the `rust` template from `nixpkgs` or whatever you prefer.
2022-07-16 09:24:38 +00:00
{ mkShell
, openssl
, pkg-config
2022-07-16 09:24:38 +00:00
, cargo
, rustc
, rustfmt
, rust-analyzer
, meson
, ninja
2022-07-16 09:24:38 +00:00
, rustPackages
, rustPlatform
}:
2021-12-26 09:33:00 +00:00
mkShell {
buildInputs = [
openssl # In case some package needs it.
pkg-config # In case some other package needs it.
2021-12-26 09:33:00 +00:00
# Rust platform.
cargo
rustc
rustfmt
rust-analyzer
# Also have these.
meson
ninja
2021-12-26 09:33:00 +00:00
];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
inputsFrom = [ cargo rustc ];
2021-12-26 09:33:00 +00:00
}