From 9a4299e5a147953a68b884f93122250717aaf92a Mon Sep 17 00:00:00 2001 From: Bauke Date: Fri, 19 Jan 2024 14:16:15 +0100 Subject: [PATCH] Add cargo-edit and a shell hook to install Hooked. --- shell.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell.nix b/shell.nix index b81e85f..c525851 100644 --- a/shell.nix +++ b/shell.nix @@ -7,9 +7,17 @@ let in mkShell rec { packages = [ + cargo-edit cargo-make mdbook mdbook-linkcheck rustup-toolchain ]; + + shellHook = '' + # If Hooked isn't installed, use cargo to install the local version of it. + if ! [[ -x "$(command -v hooked)" ]]; then + cargo install --path hooked-cli + fi + ''; }