depot/third_party/nixpkgs/pkgs/tools/misc/depotdownloader/fetch-deps.sh
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

22 lines
540 B
Bash
Executable file

#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../../. -i bash -p nuget-to-nix dotnet-sdk
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
deps_file="$(realpath "./deps.nix")"
cd ../../../..
store_src="$(nix-build . -A depotdownloader.src --no-out-link)"
src="$(mktemp -d /tmp/depotdownloader-src.XXX)"
cp -rT "$store_src" "$src"
chmod -R +w "$src"
pushd "$src"
mkdir ./nuget_tmp.packages
dotnet restore DepotDownloader.sln --packages ./nuget_tmp.packages
nuget-to-nix ./nuget_tmp.packages > "$deps_file"
popd
rm -r "$src"