opentabletdriver: migrate lockfile generation to fetch-deps

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

View file

@ -115,7 +115,7 @@ buildDotnetModule rec {
homepage = "https://github.com/OpenTabletDriver/OpenTabletDriver";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ thiagokokada ];
platforms = platforms.linux;
platforms = [ "x86_64-linux" "aarch64-linux" ];
mainProgram = "otd";
};
}

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused jq common-updater-scripts nuget-to-nix dotnet-sdk_6 dotnet-sdk_5
#!nix-shell -I nixpkgs=./. -i bash -p curl gnused jq common-updater-scripts
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
@ -23,20 +23,4 @@ sed -i ./default.nix -re "s|\"$oldDebSha256\"|\"$newDebSha256\"|"
pushd ../../../..
update-source-version opentabletdriver "$new_version"
store_src="$(nix-build -A opentabletdriver.src --no-out-link)"
src="$(mktemp -d /tmp/opentabletdriver-src.XXX)"
cp -rT "$store_src" "$src"
chmod -R +w "$src"
pushd "$src"
trap "rm -rf $src" EXIT
export DOTNET_NOLOGO=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
mkdir ./nuget_pkgs
for project in OpenTabletDriver.{Console,Daemon,UX.Gtk,Tests}; do
dotnet restore $project --packages ./nuget_pkgs
done
nuget-to-nix ./nuget_pkgs > "$deps_file"
$(nix-build -A opentabletdriver.fetch-deps --no-out-link) "$deps_file"