jackett: migrate lockfile generation to fetch-deps

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

View file

@ -36,13 +36,12 @@ buildDotnetModule rec {
ln -s $out/bin/jackett $out/bin/Jackett || :
ln -s $out/bin/Jackett $out/bin/jackett || :
'';
passthru.updateScript = ./updater.sh;
meta = with lib; {
description = "API Support for your favorite torrent trackers";
homepage = "https://github.com/Jackett/Jackett/";
license = licenses.gpl2Only;
maintainers = with maintainers; [ edwtjo nyanloutre purcell ];
platforms = platforms.all;
};
passthru.updateScript = ./updater.sh;
}

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts nuget-to-nix dotnet-sdk_6
#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
@ -15,23 +15,4 @@ fi
cd ../../..
update-source-version jackett "${new_version//v}"
store_src="$(nix-build . -A jackett.src --no-out-link)"
src="$(mktemp -d /tmp/jackett-src.XXX)"
cp -rT "$store_src" "$src"
chmod -R +w "$src"
pushd "$src"
export DOTNET_NOLOGO=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
mkdir ./nuget_pkgs
for project in src/Jackett.Server/Jackett.Server.csproj src/Jackett.Test/Jackett.Test.csproj; do
dotnet restore "$project" --packages ./nuget_pkgs
done
nuget-to-nix ./nuget_pkgs > "$deps_file"
popd
rm -r "$src"
$(nix-build -A jackett.fetch-deps --no-out-link) "$deps_file"