Pins: unpack prefetched source tarball in update-pins

What: handle prefetched tarball store paths when regenerating config options
Why: nix store prefetch-file now returns tarball path even with --unpack
Tests: not run (script change)
This commit is contained in:
DJTBOT 2026-01-29 18:18:44 +01:00
parent d85e066174
commit 9bcb3cbfd0

View File

@ -187,7 +187,15 @@ cleanup_tmp() {
rm -rf "$tmp_src"
}
trap cleanup_tmp EXIT
cp -R "$selected_source_store_path" "$tmp_src/src"
if [[ -d "$selected_source_store_path" ]]; then
cp -R "$selected_source_store_path" "$tmp_src/src"
elif [[ -f "$selected_source_store_path" ]]; then
mkdir -p "$tmp_src/src"
tar -xf "$selected_source_store_path" -C "$tmp_src/src" --strip-components=1
else
echo "Source path not found: $selected_source_store_path" >&2
exit 1
fi
chmod -R u+w "$tmp_src/src"
nix shell --extra-experimental-features "nix-command flakes" nixpkgs#nodejs_22 nixpkgs#pnpm_10 -c \