add rust devshell
This commit is contained in:
parent
2cedfe5274
commit
beadfa5754
3 changed files with 24 additions and 0 deletions
16
README.md
16
README.md
|
@ -60,3 +60,19 @@ $ nix develop github:adtya/devshell#haskell
|
||||||
```sh
|
```sh
|
||||||
use flake github:adtya/devshell#haskell
|
use flake github:adtya/devshell#haskell
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Rust
|
||||||
|
|
||||||
|
#### What's included?
|
||||||
|
- rustc
|
||||||
|
- rustfmt
|
||||||
|
- rust-analyzer
|
||||||
|
|
||||||
|
#### Activate with Nix
|
||||||
|
```sh
|
||||||
|
$ nix develop github:adtya/devshell#rust
|
||||||
|
```
|
||||||
|
#### Activate with Direnv
|
||||||
|
```sh
|
||||||
|
use flake github:adtya/devshell#rust
|
||||||
|
```
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
go = import ./shells/go.nix { inherit pkgs; };
|
go = import ./shells/go.nix { inherit pkgs; };
|
||||||
haskell = import ./shells/haskell.nix { inherit pkgs; };
|
haskell = import ./shells/haskell.nix { inherit pkgs; };
|
||||||
python = import ./shells/python.nix { inherit pkgs; };
|
python = import ./shells/python.nix { inherit pkgs; };
|
||||||
|
rust = import ./shells/rust.nix { inherit pkgs; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
7
shells/rust.nix
Normal file
7
shells/rust.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs }: pkgs.mkShell {
|
||||||
|
packages = with pkgs; [ cargo rustc rustfmt rust-analyzer ];
|
||||||
|
shellHook = ''
|
||||||
|
export CARGO_HOME=$PWD/.nix/cargo
|
||||||
|
export PATH=$CARGO_HOME/bin:$PATH
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue