forked from fafo/microscope-control
Add all the relevant tools to compile (only `cargo` needed, `rustc` is bundled with it in the right version) and develop (`clippy` and `rustfmt` can then directly be called from cargo; `rust-analyzer` provides a useful language server for editor). Made it possible to override nixpkgs by providing an overridable `pkgs`. Not sure if the `LD_LIBRARY_PATH` is needed; left it like this for now. Signed-off-by: Henner Zeller <h.zeller@acm.org>
22 lines
396 B
Nix
22 lines
396 B
Nix
{
|
|
pkgs ? import <nixpkgs> { },
|
|
}:
|
|
pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
cargo
|
|
|
|
# Useful tools
|
|
clippy
|
|
rustfmt
|
|
rust-analyzer
|
|
|
|
# minimal git
|
|
git
|
|
less
|
|
cacert # For cargo downloads and git to verify certs
|
|
];
|
|
LD_LIBRARY_PATH = with pkgs; [
|
|
# TODO: needed ?
|
|
"${xorg.libX11}/lib;${xorg.libXcursor}/lib;${xorg.libXi}/lib;${libxkbcommon}/lib"
|
|
];
|
|
}
|