Nix expr: Mute `shellHook` when running non-interactively

This commit is contained in:
YoshiRulz 2024-06-09 16:24:08 +10:00
parent c5f6dcd4e8
commit 9a737444c4
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 8 additions and 5 deletions

View File

@ -33,11 +33,14 @@
fi
alias discohawk-monort-local='${avail.launchScriptsForLocalBuild.discohawk}'
alias emuhawk-monort-local='${avail.launchScriptsForLocalBuild.emuhawk}'
pfx="$(realpath --relative-to="$PWD" "$BIZHAWKBUILD_HOME")/"
if [ "$pfx" = "./" ]; then pfx=""; fi
printf "%s\n%s\n" \
"Run ''${pfx}Dist/Build{Debug,Release}.sh to build the solution. You may need to clean up with ''${pfx}Dist/CleanupBuildOutputDirs.sh." \
"Once built, running {discohawk,emuhawk}-monort-local will pull from ''${pfx}output/* and use Mono from Nixpkgs."
case "$-" in *i*)
pfx="$(realpath --relative-to="$PWD" "$BIZHAWKBUILD_HOME")/"
if [ "$pfx" = "./" ]; then pfx=""; fi
printf "%s\n%s\n" \
"Run ''${pfx}Dist/Build{Debug,Release}.sh to build the solution. You may need to clean up with ''${pfx}Dist/CleanupBuildOutputDirs.sh." \
"Once built, running {discohawk,emuhawk}-monort-local will pull from ''${pfx}output/* and use Mono from Nixpkgs."
;;
esac
'';
};
shells = lib.pipe avail [