This commit is contained in:
2025-11-11 23:16:50 +01:00
parent 3afcbaac0d
commit 158ac4f91b
2 changed files with 4 additions and 5 deletions

View File

@@ -64,7 +64,6 @@
packages = [
just
nuget-to-json
azure-artifacts-credprovider
(
with dotnetCorePackages;
combinePackages [

View File

@@ -61,7 +61,6 @@ done
[[ -d "$package" ]] || continue
cd "$package"
for version in *; do
id=$(xmlstarlet sel -t -v /_:package/_:metadata/_:id "$version"/*.nuspec)
if grep -qxF "$id.$version.nupkg" "$excluded_list"; then
@@ -71,7 +70,6 @@ done
# packages in the nix store should have an empty metadata file
# packages installed with 'dotnet tool' may be missing 'source'
used_source="$(jq -r 'if has("source") then .source elif has("contentHash") then "__unknown" else "" end' "$version"/.nupkg.metadata)"
found=false
if [[ -z "$used_source" || -d "$used_source" ]]; then
@@ -79,13 +77,15 @@ done
fi
for source in "${remote_sources[@]}"; do
url="${base_addresses[$source]}$package/$version/$package.$version.nupkg"
if [[ "$source" == "$used_source" ]]; then
hash="$(nix-hash --type sha256 --flat --sri "$version/$package.$version".nupkg)"
found=true
break
else
# do nothing if the package does not already exist
# locally, since nix-prefetch-url does not handle authentication
:
fi
done