Added rust to devShell
This commit is contained in:
parent
f32764b652
commit
fcbbb03060
|
@ -8,6 +8,7 @@ let
|
||||||
imports = [
|
imports = [
|
||||||
./shell.nix
|
./shell.nix
|
||||||
./languages/python.nix
|
./languages/python.nix
|
||||||
|
./languages/rust.nix
|
||||||
./utilities/cuda.nix
|
./utilities/cuda.nix
|
||||||
./utilities/jupyter.nix
|
./utilities/jupyter.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
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 {
|
||||||
|
packages = [
|
||||||
|
bacon
|
||||||
|
evcxr
|
||||||
|
cargo
|
||||||
|
|
||||||
|
rustPackage
|
||||||
|
|
||||||
|
# TODO: Might be needed for bindgen
|
||||||
|
# rustPlatform.bindgenHook
|
||||||
|
# pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
# env.RUST_SRC_PATH = "${rustPackage}/lib/rustlib/src/rust/library";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue