mame: add updateScript

This commit is contained in:
Thiago Kenji Okada 2022-04-09 11:31:22 +01:00
parent c3a33d9bb4
commit 876b195ecc

View File

@ -18,6 +18,7 @@
, SDL2
, SDL2_ttf
, which
, writeScript
}:
let
@ -93,6 +94,16 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
passthru.updateScript = writeScript "mame-update-script" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts jq
set -eu -o pipefail
latest_version=$(curl -s https://api.github.com/repos/mamedev/mame/releases/latest | jq --raw-output .tag_name)
update-source-version mame "''${latest_version/mame0/0.}"
'';
meta = with lib; {
description = "Is a multi-purpose emulation framework";
homepage = "https://www.mamedev.org/";