diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/backup/discordchatexporter-cli/updater.sh')
-rwxr-xr-x | nixpkgs/pkgs/tools/backup/discordchatexporter-cli/updater.sh | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/nixpkgs/pkgs/tools/backup/discordchatexporter-cli/updater.sh b/nixpkgs/pkgs/tools/backup/discordchatexporter-cli/updater.sh index ff5c44a19bcd..1fc261c29803 100755 --- a/nixpkgs/pkgs/tools/backup/discordchatexporter-cli/updater.sh +++ b/nixpkgs/pkgs/tools/backup/discordchatexporter-cli/updater.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl jq common-updater-scripts dotnet-sdk_5 +#!nix-shell -i bash -p curl jq common-updater-scripts nuget-to-nix dotnet-sdk_5 set -eo pipefail cd "$(dirname "${BASH_SOURCE[0]}")" @@ -24,21 +24,7 @@ pushd "$src" mkdir ./nuget_tmp.packages dotnet restore DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj --packages ./nuget_tmp.packages -echo "{ fetchNuGet }: [" >"$deps_file" -while read pkg_spec; do - { read pkg_name; read pkg_version; } < <( - # Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3` - sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec") - pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)" - cat >>"$deps_file" <<EOF - (fetchNuGet { - name = "$pkg_name"; - version = "$pkg_version"; - sha256 = "$pkg_sha256"; - }) -EOF -done < <(find ./nuget_tmp.packages -name '*.nuspec' | sort) -echo "]" >>"$deps_file" +nuget-to-nix ./nuget_tmp.packages > "$deps_file" popd rm -r "$src" |