diff options
author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2022-04-09 11:31:22 +0100 |
---|---|---|
committer | Thiago Kenji Okada <thiagokokada@gmail.com> | 2022-04-09 11:31:22 +0100 |
commit | 876b195ecc9f596c9f84670a511fb047c201b0f6 (patch) | |
tree | 7d6e58f30b2560d4e09a238a4c1f41f6113c7f7f /pkgs/applications/emulators | |
parent | c3a33d9bb43e2c75daa1a6db29f047cabcbdb784 (diff) |
mame: add updateScript
Diffstat (limited to 'pkgs/applications/emulators')
-rw-r--r-- | pkgs/applications/emulators/mame/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/mame/default.nix b/pkgs/applications/emulators/mame/default.nix index ce3fb3d06aed2..b9172ab7f91e0 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/"; |