baget: migrate lockfile generation to fetch-deps

This commit is contained in:
Ivar Scholten 2022-08-18 23:09:45 +02:00
parent efd92e7fd7
commit c68b58fdd1
No known key found for this signature in database
GPG key ID: E22887AD87C33E3C
2 changed files with 2 additions and 19 deletions

View file

@ -23,7 +23,6 @@ buildDotnetModule rec {
description = "A lightweight NuGet and symbol server";
license = licenses.mit;
homepage = "https://loic-sharma.github.io/BaGet/";
platforms = platforms.all;
maintainers = [ maintainers.abbradar ];
};
}

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p gnused jq common-updater-scripts nuget-to-nix dotnet-sdk_3 nix-prefetch-github
#!nix-shell -I nixpkgs=./. -i bash -p gnused jq common-updater-scripts nix-prefetch-github
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
@ -21,20 +21,4 @@ rm repo_info
pushd ../../../..
update-source-version baget "$new_version" "$new_hash"
store_src="$(nix-build -A baget.src --no-out-link)"
src="$(mktemp -d /tmp/baget-src.XXX)"
cp -rT "$store_src" "$src"
trap 'rm -r "$src"' EXIT
chmod -R +w "$src"
pushd "$src"
export DOTNET_NOLOGO=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
mkdir ./nuget_pkgs
dotnet restore src/BaGet/BaGet.csproj --packages ./nuget_pkgs
nuget-to-nix ./nuget_pkgs > "$deps_file"
$(nix-build -A baget.fetch-deps --no-out-link) "$deps_file"