wesnoth: add update script

+10
+10
pkgs/games/wesnoth/default.nix
··· 23 23 lua, 24 24 curl, 25 25 fetchpatch, 26 + nix-update-script, 26 27 }: 27 28 28 29 stdenv.mkDerivation rec { ··· 120 121 EOF 121 122 chmod +x "$out/bin/wesnoth" 122 123 ''; 124 + 125 + passthru.updateScript = nix-update-script { 126 + extraArgs = [ 127 + "--version-regex" 128 + # the minor release number also denotes if this is a beta release: 129 + # even is stable, odd is beta 130 + "^(\\d+\\.\\d*[02468]\\.\\d+)$" 131 + ]; 132 + }; 123 133 124 134 meta = with lib; { 125 135 description = "Battle for Wesnoth, a free, turn-based strategy game with a fantasy theme";