34 lines
815 B
Nix
34 lines
815 B
Nix
{
|
|
description = "Pure Rust development environment";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in {
|
|
devShells.default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
rustc
|
|
cargo
|
|
rust-analyzer
|
|
clippy
|
|
rustfmt
|
|
pkg-config
|
|
openssl
|
|
];
|
|
|
|
shellHook = ''
|
|
echo ">>> Pure Rust DevShell (Nix managed toolchain)"
|
|
cargo --version
|
|
rustc --version
|
|
echo "Run: cargo new <project_name>"
|
|
'';
|
|
};
|
|
});
|
|
}
|