wesnoth: add update script

+10
+10
pkgs/games/wesnoth/default.nix
··· 23 lua, 24 curl, 25 fetchpatch, 26 }: 27 28 stdenv.mkDerivation rec { ··· 120 EOF 121 chmod +x "$out/bin/wesnoth" 122 ''; 123 124 meta = with lib; { 125 description = "Battle for Wesnoth, a free, turn-based strategy game with a fantasy theme";
··· 23 lua, 24 curl, 25 fetchpatch, 26 + nix-update-script, 27 }: 28 29 stdenv.mkDerivation rec { ··· 121 EOF 122 chmod +x "$out/bin/wesnoth" 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 + }; 133 134 meta = with lib; { 135 description = "Battle for Wesnoth, a free, turn-based strategy game with a fantasy theme";