My development environment setup for Rust is based on the blog How I Start: Nix which in my opinion describes the setup procedure quite comprehensive.
Meanwhile I’m trying to add some extensions to the rust setup and I’m facing difficulty to do it by my self.
Below is my nix/rust.nix
which nix-shell
loads errorless. But is seems the content of extensions
remains unevaluated. It doesn’t matter what extensions
contain. No error appears at all.
Could any one explain why extensions
are ignored and give an advice how it could be fixed?
nix/rust.nix
{ sources ? import ./sources.nix }:
let
pkgs =
import sources.nixpkgs { overlays = [ (import sources.nixpkgs-mozilla) ]; };
rust = (
pkgs.latest.rustChannels.nightly.rust.override {
extensions = [ "rust-src" "rust-analysis" "rustfmt-preview" ];
}
);
channel = "nightly";
date = "2021-01-14";
targets = [ ];
chan = pkgs.rustChannelOfTargets channel date targets;
in
with rust;
chan
Thank you,
Alexei