Rust: Difference between revisions
imported>Samuela No edit summary |
imported>Samuela |
||
Line 2: | Line 2: | ||
== Installing via nixpkgs == | == Installing via nixpkgs == | ||
The <code>cargo</code> and <code>rustc</code> derivations provide the rust toolchain in nixpkgs. Here's an example <code>shell.nix</code>: | The <code>cargo</code> and <code>rustc</code> derivations provide the rust toolchain in nixpkgs. A pro of using nixpkgs is that it's dead-simple and you get pinned versions, deterministic builds in nix-shell, etc. However, nixpkgs only maintains a single version of the rust stable toolchain, so if you require a nightly toolchain or require switching between multiple toolchains then this approach may not be for you. | ||
Here's an example <code>shell.nix</code>: | |||
<syntaxHighlight lang="nix"> | <syntaxHighlight lang="nix"> |