From bdc31fce2a6dd7e8d8bd221382e911448fd407cb Mon Sep 17 00:00:00 2001 From: Philipp Rintz Date: Thu, 28 Sep 2023 20:55:48 +0200 Subject: [PATCH] pocket-updater-utility: 2.31.0 -> 2.36.2 --- .../add-runtime-identifier.patch | 17 +++++------------ .../games/pocket-updater-utility/default.nix | 8 ++++++-- .../tools/games/pocket-updater-utility/deps.nix | 1 + .../games/pocket-updater-utility/update.sh | 13 +++++++++++++ 4 files changed, 25 insertions(+), 14 deletions(-) create mode 100755 pkgs/tools/games/pocket-updater-utility/update.sh diff --git a/pkgs/tools/games/pocket-updater-utility/add-runtime-identifier.patch b/pkgs/tools/games/pocket-updater-utility/add-runtime-identifier.patch index a01822c0366e..38d5dcd3af16 100644 --- a/pkgs/tools/games/pocket-updater-utility/add-runtime-identifier.patch +++ b/pkgs/tools/games/pocket-updater-utility/add-runtime-identifier.patch @@ -1,14 +1,14 @@ -From ccbe5c0401d6965a6daaa0b7bb022f63908c8942 Mon Sep 17 00:00:00 2001 +From c9ca58262045b82537bd8284d426c91582cc7ed7 Mon Sep 17 00:00:00 2001 From: Philipp Rintz -Date: Mon, 28 Aug 2023 19:19:41 +0200 +Date: Thu, 28 Sep 2023 21:22:18 +0200 Subject: [PATCH] uncommited --- - pocket_updater.csproj | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + pocket_updater.csproj | 1 + + 1 file changed, 1 insertion(+) diff --git a/pocket_updater.csproj b/pocket_updater.csproj -index 11f604c..410bd47 100644 +index 30f77d5..ad6bf69 100644 --- a/pocket_updater.csproj +++ b/pocket_updater.csproj @@ -12,6 +12,7 @@ @@ -19,13 +19,6 @@ index 11f604c..410bd47 100644 -@@ -26,4 +27,4 @@ - - - -- -\ No newline at end of file -+ -- 2.40.1 diff --git a/pkgs/tools/games/pocket-updater-utility/default.nix b/pkgs/tools/games/pocket-updater-utility/default.nix index 2d841c00c516..dc00f3b4a181 100644 --- a/pkgs/tools/games/pocket-updater-utility/default.nix +++ b/pkgs/tools/games/pocket-updater-utility/default.nix @@ -11,13 +11,13 @@ buildDotnetModule rec { pname = "pocket-updater-utility"; - version = "2.31.0"; + version = "2.36.2"; src = fetchFromGitHub { owner = "mattpannella"; repo = "${pname}"; rev = "${version}"; - hash = "sha256-z90YITAW2Nv+Mq2q56As4PoHqGPEnvDUPH73bhz/xnw="; + hash = "sha256-W+7qN898+GbbvPgITXaRoFNuNL/2K8isbraQFWxRXuk="; }; buildInputs = [ @@ -48,6 +48,10 @@ buildDotnetModule rec { dotnet-sdk = dotnetCorePackages.sdk_6_0; dotnet-runtime = dotnetCorePackages.runtime_6_0; + passthru = { + updateScript = ./update.sh; + }; + meta = with lib; { homepage = "https://github.com/mattpannella/pocket-updater-utility"; description = "Analogue Pocket Updater Utility"; diff --git a/pkgs/tools/games/pocket-updater-utility/deps.nix b/pkgs/tools/games/pocket-updater-utility/deps.nix index 0e9f626012d9..eea7ea49accb 100644 --- a/pkgs/tools/games/pocket-updater-utility/deps.nix +++ b/pkgs/tools/games/pocket-updater-utility/deps.nix @@ -3,6 +3,7 @@ { fetchNuGet }: [ (fetchNuGet { pname = "CommandLineParser"; version = "2.9.1"; sha256 = "1sldkj8lakggn4hnyabjj1fppqh50fkdrr1k99d4gswpbk5kv582"; }) + (fetchNuGet { pname = "ConsoleMenu-simple"; version = "2.6.1"; sha256 = "1vbi77schslq3nsardm4v8mrk0zi0phczwm2np1bl9z7c84h5cym"; }) (fetchNuGet { pname = "Crc32.NET"; version = "1.2.0"; sha256 = "0qaj3192k1vfji87zf50rhydn5mrzyzybrs2k4v7ap29k8i0vi5h"; }) (fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; }) (fetchNuGet { pname = "NETStandard.Library"; version = "2.0.0"; sha256 = "1bc4ba8ahgk15m8k4nd7x406nhi0kwqzbgjk2dmw52ss553xz7iy"; }) diff --git a/pkgs/tools/games/pocket-updater-utility/update.sh b/pkgs/tools/games/pocket-updater-utility/update.sh new file mode 100755 index 000000000000..9f64eeac7dc9 --- /dev/null +++ b/pkgs/tools/games/pocket-updater-utility/update.sh @@ -0,0 +1,13 @@ +#! /usr/bin/env nix-shell +#! nix-shell -i bash -p curl jq common-updater-scripts + +set -eu -o pipefail + +TARGET_VERSION=$(curl -s "https://api.github.com/repos/mattpannella/pocket-updater-utility/releases?per_page=1" | jq -r '.[0].tag_name') + +if [[ "$UPDATE_NIX_OLD_VERSION" == "$TARGET_VERSION" ]]; then + echo "pocket-updater-utility is up-to-date: ${UPDATE_NIX_OLD_VERSION}" + exit 0 +fi + +update-source-version pocket-updater-utility "$TARGET_VERSION"