pcsx2-bin: added passthru.updateScript

This commit is contained in:
Matteo Pacini 2024-07-12 16:40:32 +01:00
parent 8d75ee9c03
commit 89f2921956
2 changed files with 21 additions and 7 deletions

View File

@ -32,16 +32,22 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook postInstall
'';
passthru = {
updateScript = ./update.sh;
};
meta = {
inherit (pcsx2.meta) homepage longDescription license changelog downloadPage;
inherit (pcsx2.meta)
homepage
longDescription
license
changelog
downloadPage
;
description = "Playstation 2 emulator; precompiled binary for MacOS, repacked from official website";
maintainers = with lib.maintainers; [
matteopacini
];
maintainers = with lib.maintainers; [ matteopacini ];
mainProgram = "pcsx2-qt";
platforms = lib.systems.inspect.patternLogicalAnd
lib.systems.inspect.patterns.isDarwin
lib.systems.inspect.patterns.isx86_64;
platforms = lib.systems.inspect.patternLogicalAnd lib.systems.inspect.patterns.isDarwin lib.systems.inspect.patterns.isx86_64;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@ -0,0 +1,8 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq gnused common-updater-scripts
set -eou pipefail
LATEST_VERSION="$(curl --silent --fail ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/PCSX2/pcsx2/releases" | jq '.[0].tag_name' --raw-output | sed 's/^v//')"
update-source-version pcsx2-bin "$LATEST_VERSION"