osu-lazer: migrate lockfile generation to fetch-deps

This commit is contained in:
Ivar Scholten 2022-08-18 23:50:57 +02:00
parent e19f0768cc
commit 12b912258e
No known key found for this signature in database
GPG Key ID: E22887AD87C33E3C

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../. -i bash -p curl jq common-updater-scripts nuget-to-nix dotnet-sdk
#!nix-shell -I nixpkgs=../../../. -i bash -p curl jq common-updater-scripts
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
@ -18,22 +18,4 @@ if [[ "$1" != "--deps-only" ]]; then
update-source-version osu-lazer "$new_version"
fi
store_src="$(nix-build . -A osu-lazer.src --no-out-link)"
src="$(mktemp -d /tmp/osu-src.XXX)"
echo "Temp src dir: $src"
cp -rT "$store_src" "$src"
chmod -R +w "$src"
pushd "$src"
export DOTNET_NOLOGO=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
mkdir ./nuget_tmp.packages
dotnet --info
dotnet restore osu.Desktop --packages ./nuget_tmp.packages --runtime linux-x64
nuget-to-nix ./nuget_tmp.packages > "$deps_file"
popd
rm -r "$src"
$(nix-build . -A osu-lazer.fetch-deps --no-out-link) "$deps_file"