nix: switch to shell.nix instead of flakes
This commit is contained in:
parent
a1921bf27e
commit
08dce236cf
4 changed files with 18 additions and 59 deletions
2
.envrc
2
.envrc
|
|
@ -1 +1 @@
|
|||
use flake
|
||||
use nix
|
||||
|
|
|
|||
27
flake.lock
generated
27
flake.lock
generated
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1773821835,
|
||||
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
31
flake.nix
31
flake.nix
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
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"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
17
shell.nix
Normal file
17
shell.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{pkgs ? import <nixpkgs> {}}:
|
||||
pkgs.mkShell {
|
||||
packages = 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"
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue