rust-lang / rustlings

:crab: Small exercises to get you used to reading and writing Rust code!
https://rustlings.cool
MIT License
52.69k stars 10.02k forks source link

What happened to nix? #2054

Closed MatthiasvB closed 1 month ago

MatthiasvB commented 1 month ago

As a nix user, I was just wondering if perhaps rustlings could be installed in nix enabled environments. There are a bunch issues here that discuss adding a nix config and then later ones describing problems with it. But now no nix specific config or documentation is around. What happened?

mo8it commented 1 month ago

Rustlings can be installed with Nix. You install it with cargo install rustlings. So you need to have cargo installed. I tested it in a container with the following:

nix-env -iA nixpkgs.rustup nixpkgs.gcc
rustup default stable
cargo install rustlings
~/.cargo/bin/rustlings # Better add ~/.cargo/bin to your PATH

After making Rustlings a self-contained binary in version 6, I removed the outdated Nix files. I will not add anything that I can't maintain because I don't use Nix. If people want to use Nix, they should figure out how to install Rust and do cargo install.

Brisingr05 commented 2 weeks ago

Note for Nix users: rustlings is now in Nixpkgs (track the PR here).