makeShell: make help message extensible

Users can now override help and print more help messages alongside `nixBitcoinHelp`.
This commit is contained in:
Erik Arvstedt 2021-11-02 13:07:43 +01:00
parent 0478354477
commit 6584540828
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -22,7 +22,7 @@ pkgs.stdenv.mkDerivation {
# 2. the shell is interactive
if [[ -t 1 && $- == *i* ]]; then isInteractive=1; else isInteractive=; fi
help() {
nixBitcoinHelp() {
echo "nix-bitcoin path: ${toString ../.}"
echo
echo "Available commands"
@ -46,6 +46,7 @@ pkgs.stdenv.mkDerivation {
echo "update-nix-bitcoin"
echo " Fetch and use the latest version of nix-bitcoin"
}
help() { nixBitcoinHelp; }
h() { help; }
fetch-release() {