install.sh: jq automatisch aus nixpkgs beziehen wenn nicht vorhanden
All checks were successful
Build AppImage / build (push) Has been skipped
All checks were successful
Build AppImage / build (push) Has been skipped
Vanilla-NixOS hat kein jq im PATH. Der Installer holt es jetzt via nix-build '<nixpkgs>' -A jq und haengt es temporaer an den PATH. Kein Abbruch mehr fuer Erstnutzer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
506f1d3fdc
commit
71e84067f8
1 changed files with 14 additions and 2 deletions
16
install.sh
16
install.sh
|
|
@ -40,10 +40,22 @@ err() { echo "${RED}✗${RST} $*" >&2; exit 1; }
|
||||||
|
|
||||||
# --- 1. Voraussetzungen pruefen -------------------------------------------
|
# --- 1. Voraussetzungen pruefen -------------------------------------------
|
||||||
step "Voraussetzungen pruefen"
|
step "Voraussetzungen pruefen"
|
||||||
for cmd in nix-build nix-env curl jq sha256sum; do
|
for cmd in nix-build nix-env curl sha256sum; do
|
||||||
command -v "$cmd" >/dev/null || err "$cmd nicht installiert. Abbruch."
|
command -v "$cmd" >/dev/null || err "$cmd nicht installiert. Abbruch."
|
||||||
done
|
done
|
||||||
ok "Nix, curl, jq, sha256sum vorhanden"
|
ok "Nix, curl, sha256sum vorhanden"
|
||||||
|
|
||||||
|
# jq ist auf Vanilla-NixOS nicht gesetzt — aus nixpkgs ziehen
|
||||||
|
if ! command -v jq >/dev/null; then
|
||||||
|
echo " ${YEL}!${RST} jq fehlt — hole aus nixpkgs"
|
||||||
|
JQ_OUT=$(nix-build '<nixpkgs>' -A jq --no-out-link 2>/dev/null || true)
|
||||||
|
if [ -n "$JQ_OUT" ] && [ -x "$JQ_OUT/bin/jq" ]; then
|
||||||
|
export PATH="$JQ_OUT/bin:$PATH"
|
||||||
|
ok "jq temporaer aus $JQ_OUT"
|
||||||
|
else
|
||||||
|
err "jq konnte nicht ueber nix-build bezogen werden. Abbruch."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f /etc/NIXOS ] && [ ! -e /etc/nix/nix.conf ]; then
|
if [ ! -f /etc/NIXOS ] && [ ! -e /etc/nix/nix.conf ]; then
|
||||||
echo " ${YEL}!${RST} Kein NixOS-System erkannt — der Installer setzt Nix voraus."
|
echo " ${YEL}!${RST} Kein NixOS-System erkannt — der Installer setzt Nix voraus."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue