Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"nixEnvSelector.nixFile": "${workspaceFolder}/shell.nix"
}
2 changes: 2 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "stable"
30 changes: 30 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
pkgs ? import <nixpkgs> { },
}:

pkgs.mkShell {
buildInputs = [
pkgs.rustup
];

shellHook = ''
DATA_DIR=/tmp/rust/lum
export RUSTUP_HOME=$DATA_DIR/rustup
export CARGO_HOME=$DATA_DIR/cargo
export PATH=$CARGO_HOME/bin:$PATH
mkdir -p $CARGO_HOME
mkdir -p $RUSTUP_HOME

rustup default stable
rustup update
cargo fetch

echo
echo
echo

echo "Rustup installed at $RUSTUP_HOME"
echo "Cargo installed at $CARGO_HOME"
echo $(cargo --version)
'';
}
Loading