diff --git a/pkgs/games/wesnoth/default.nix b/pkgs/games/wesnoth/default.nix index 80c16f190da7..5bc291439b5d 100644 --- a/pkgs/games/wesnoth/default.nix +++ b/pkgs/games/wesnoth/default.nix @@ -23,6 +23,7 @@ lua, curl, fetchpatch, + nix-update-script, }: stdenv.mkDerivation rec { @@ -121,6 +122,15 @@ stdenv.mkDerivation rec { chmod +x "$out/bin/wesnoth" ''; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + # the minor release number also denotes if this is a beta release: + # even is stable, odd is beta + "^(\\d+\\.\\d*[02468]\\.\\d+)$" + ]; + }; + meta = with lib; { description = "Battle for Wesnoth, a free, turn-based strategy game with a fantasy theme"; longDescription = ''