From 84b2a2c3bbec449eaa57e6a775e0f46e519c99a5 Mon Sep 17 00:00:00 2001 From: Joseph LaFreniere Date: Sat, 31 Dec 2022 13:59:04 -0600 Subject: [PATCH] Include cargo, nixfmt, rustc, and rustfmt in devShell --- flake.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index f234e43..b34a093 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,7 @@ pre-commit = pre-commit-hooks.lib."${system}".run; in { + # `nix flake check` checks = { # Build the crate as part of `nix flake check` for convenience inherit rga; @@ -91,8 +92,7 @@ partitionType = "count"; }; - inherit pre-commit; - pre-commit-check = pre-commit { + pre-commit = pre-commit { src = ./.; hooks = { nixfmt.enable = true; @@ -115,9 +115,10 @@ # `nix develop` devShells.default = pkgs.mkShell { - inherit (self.checks.${system}.pre-commit-check) shellHook; + inherit (self.checks.${system}.pre-commit) shellHook; inputsFrom = builtins.attrValues self.checks; - buildInputs = buildInputs; + buildInputs = buildInputs + ++ (with pkgs; [ cargo nixfmt rustc rustfmt ]); }; }); }