dotfiles/shell-modules/languages/rust.nix

35 lines
541 B
Nix
Raw Normal View History

2025-02-09 22:53:27 +00:00
{
pkgs,
lib,
config,
...
}:
with lib;
let
rustPackage = pkgs.rustc;
in
{
options.rust = {
enable = mkEnableOption "Rust";
# TODO: Add option to specify toolchain file
# See https://ayats.org/blog/nix-rustup
};
config = mkIf config.rust.enable {
2025-02-09 22:57:47 +00:00
packages = with pkgs; [
2025-02-09 22:53:27 +00:00
bacon
evcxr
cargo
rustPackage
# TODO: Might be needed for bindgen
# rustPlatform.bindgenHook
# pkg-config
];
# env.RUST_SRC_PATH = "${rustPackage}/lib/rustlib/src/rust/library";
};
}