Rust: Difference between revisions

imported>Legendofmiracles
adds a example shell.nix file for rust development
imported>Legendofmiracles
m indentation
Line 94: Line 94:
{ pkgs ? import <nixpkgs> {}  }:
{ pkgs ? import <nixpkgs> {}  }:
pkgs.mkShell {
pkgs.mkShell {
          nativeBuildInputs = with pkgs; [ rustc cargo gcc ];
  nativeBuildInputs = with pkgs; [ rustc cargo gcc ];
  buildInputs = with pkgs; [ rustfmt clippy ];


          buildInputs = with pkgs; [ rustfmt clippy ];
  RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
 
          RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
}
}
</syntaxHighlight>
</syntaxHighlight>