clean up
This commit is contained in:
@@ -64,7 +64,6 @@
|
|||||||
packages = [
|
packages = [
|
||||||
just
|
just
|
||||||
nuget-to-json
|
nuget-to-json
|
||||||
azure-artifacts-credprovider
|
|
||||||
(
|
(
|
||||||
with dotnetCorePackages;
|
with dotnetCorePackages;
|
||||||
combinePackages [
|
combinePackages [
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ done
|
|||||||
[[ -d "$package" ]] || continue
|
[[ -d "$package" ]] || continue
|
||||||
cd "$package"
|
cd "$package"
|
||||||
for version in *; do
|
for version in *; do
|
||||||
|
|
||||||
id=$(xmlstarlet sel -t -v /_:package/_:metadata/_:id "$version"/*.nuspec)
|
id=$(xmlstarlet sel -t -v /_:package/_:metadata/_:id "$version"/*.nuspec)
|
||||||
|
|
||||||
if grep -qxF "$id.$version.nupkg" "$excluded_list"; then
|
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 in the nix store should have an empty metadata file
|
||||||
# packages installed with 'dotnet tool' may be missing 'source'
|
# 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)"
|
used_source="$(jq -r 'if has("source") then .source elif has("contentHash") then "__unknown" else "" end' "$version"/.nupkg.metadata)"
|
||||||
|
|
||||||
found=false
|
found=false
|
||||||
|
|
||||||
if [[ -z "$used_source" || -d "$used_source" ]]; then
|
if [[ -z "$used_source" || -d "$used_source" ]]; then
|
||||||
@@ -79,13 +77,15 @@ done
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for source in "${remote_sources[@]}"; do
|
for source in "${remote_sources[@]}"; do
|
||||||
|
|
||||||
url="${base_addresses[$source]}$package/$version/$package.$version.nupkg"
|
url="${base_addresses[$source]}$package/$version/$package.$version.nupkg"
|
||||||
|
|
||||||
if [[ "$source" == "$used_source" ]]; then
|
if [[ "$source" == "$used_source" ]]; then
|
||||||
hash="$(nix-hash --type sha256 --flat --sri "$version/$package.$version".nupkg)"
|
hash="$(nix-hash --type sha256 --flat --sri "$version/$package.$version".nupkg)"
|
||||||
found=true
|
found=true
|
||||||
break
|
break
|
||||||
|
else
|
||||||
|
# do nothing if the package does not already exist
|
||||||
|
# locally, since nix-prefetch-url does not handle authentication
|
||||||
|
:
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user