From 56d908c6dc16dc29121d122ba22ed925587aa5d1 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Fri, 19 Jun 2026 11:04:12 +0700 Subject: [PATCH] Use Nix npm fetcher v2 --- nix/package.nix | 1 + scripts/update-nix.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index b904333f5..08623bde2 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -52,6 +52,7 @@ buildNpmPackage rec { # Default hash lives in nix/npm-deps.hash (see arg default above). # CI auto-updates that file when package-lock.json changes (see .github/workflows/). inherit npmDepsHash; + npmDepsFetcherVersion = 2; # Prevent onnxruntime-node's install script from running during automatic # npm rebuild (it tries to download from api.nuget.org, which fails in the sandbox). diff --git a/scripts/update-nix.sh b/scripts/update-nix.sh index 108cd0d60..b33cd4f99 100755 --- a/scripts/update-nix.sh +++ b/scripts/update-nix.sh @@ -35,7 +35,7 @@ NIXPKGS_URL="$(node -p " STDERR_LOG="$(mktemp)" trap "rm -f '$STDERR_LOG'" EXIT -if ! NEW_HASH="$(nix shell "${NIXPKGS_URL}#prefetch-npm-deps" -c prefetch-npm-deps "$LOCK_FILE" 2>"$STDERR_LOG")"; then +if ! NEW_HASH="$(NIX_NPM_FETCHER_VERSION=2 nix shell "${NIXPKGS_URL}#prefetch-npm-deps" -c prefetch-npm-deps "$LOCK_FILE" 2>"$STDERR_LOG")"; then echo "ERROR: prefetch-npm-deps failed:" >&2 tail -20 "$STDERR_LOG" >&2 exit 1