Nix compatibility fixes

This commit is contained in:
The MMGen Project 2024-12-30 11:31:39 +00:00
commit 353a4a1f4e
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
9 changed files with 63 additions and 21 deletions

View file

@ -217,6 +217,12 @@ do_reexec() {
fi
}
in_nix_environment() {
for path in ${PATH//:/ }; do
realpath -q $path | grep -q '^/nix/store/' && break
done
}
# start execution
set -e
@ -368,6 +374,8 @@ do
esac
done
in_nix_environment && parity --help >/dev/null 2>&1 || SKIP_PARITY=1
[ "$MMGEN_DISABLE_COLOR" ] || {
RED="\e[31;1m" GREEN="\e[32;1m" YELLOW="\e[33;1m" BLUE="\e[34;1m" MAGENTA="\e[35;1m" CYAN="\e[36;1m"
RESET="\e[0m"