31 lines
758 B
Nix
31 lines
758 B
Nix
{
|
|
description = "Rust dev flake";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
}: let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {inherit system;};
|
|
in {
|
|
devShells."x86_64-linux".default = pkgs.mkShell {
|
|
nativeBuildInputs = with pkgs; [
|
|
];
|
|
buildInputs = with pkgs; [
|
|
rustc
|
|
rust-analyzer
|
|
rustfmt
|
|
clippy
|
|
cargo
|
|
cargo-watch
|
|
];
|
|
shellHook = ''
|
|
echo "========================================================="
|
|
echo "Pour lancer le projet et avoir les changements en temps réel : "
|
|
echo "- cargo watch -w content -w src -w templates -w static -x run"
|
|
'';
|
|
};
|
|
};
|
|
}
|