diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index ce3fb3d06aed..b9172ab7f91e 100644 --- a/pkgs/applications/emulators/mame/default.nix +++ b/pkgs/applications/emulators/mame/default.nix @@ -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/";