priprava 3 ready
This commit is contained in:
33
flake.nix
Normal file
33
flake.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
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>"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user