feat: Add flake.nix for nix users

Co-authored-by: Winter <winter@winter.cafe>
This commit is contained in:
Moritz Böhme
2022-01-25 11:47:16 +01:00
parent c923e7af73
commit 8e0f5bf125
4 changed files with 132 additions and 0 deletions

View File

@@ -28,6 +28,19 @@ curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh |
This will install Rustlings and give you access to the `rustlings` command. Run it to get started!
### Nix
Basically: Clone the repository at the latest tag, finally run `nix develop` or `nix-shell`.
```bash
# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.2.1)
git clone -b 5.2.1 --depth 1 https://github.com/rust-lang/rustlings
cd rustlings
# if nix version > 2.3
nix develop
# if nix version <= 2.3
nix-shell
```
## Windows
In PowerShell (Run as Administrator), set `ExecutionPolicy` to `RemoteSigned`: