Merge pull request #326590 from matteo-pacini/pcsx2-bin-update-script

pcsx2-bin: added passthru.updateScript
This commit is contained in:
❄️
2024-07-19 14:44:00 -03:00
committed by GitHub
2 changed files with 21 additions and 7 deletions
+13 -7
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 ];
};
})
+8
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"