mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02:00
nuget-to-nix: fix the bug of wrong url in the generated nix file when the package base address of the nuget source does not have a trailing slash
This commit is contained in:
parent
a0c5842bf6
commit
acaf847d4f
|
@ -33,9 +33,13 @@ for index in "${sources[@]}"; do
|
|||
|
||||
remote_sources+=($index)
|
||||
|
||||
base_addresses[$index]=$(
|
||||
base_address=$(
|
||||
curl --compressed --netrc -fsL "$index" | \
|
||||
jq -r '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"')
|
||||
if [[ ! "$base_address" == */ ]]; then
|
||||
base_address="$base_address/"
|
||||
fi
|
||||
base_addresses[$index]="$base_address"
|
||||
done
|
||||
|
||||
echo "{ fetchNuGet }: ["
|
||||
|
|
Loading…
Reference in a new issue