Install tools in a local output directory.

This commit is contained in:
Bauke 2024-01-19 15:33:01 +01:00
parent 9a4299e5a1
commit d12895184b
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 7 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,4 +3,5 @@
coverage/ coverage/
debug/ debug/
hooked-book/book/ hooked-book/book/
outputs/
target/ target/

View File

@ -15,9 +15,14 @@ mkShell rec {
]; ];
shellHook = '' shellHook = ''
# Add the outputs directory to PATH where local tools will be installed.
PATH="$PATH:$out/bin"
# If Hooked isn't installed, use cargo to install the local version of it. # If Hooked isn't installed, use cargo to install the local version of it.
if ! [[ -x "$(command -v hooked)" ]]; then if ! [[ -x "$(command -v hooked)" ]]; then
cargo install --path hooked-cli cargo install --path hooked-cli --root $out
fi fi
hooked install
''; '';
} }