diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 0ee91ebffbed..deed04697de5 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -109,6 +109,7 @@ in docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {}; documize = handleTest ./documize.nix {}; dokuwiki = handleTest ./dokuwiki.nix {}; + domination = handleTest ./domination.nix {}; dovecot = handleTest ./dovecot.nix {}; ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {}; ec2-nixops = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-nixops or {}; diff --git a/nixos/tests/domination.nix b/nixos/tests/domination.nix new file mode 100644 index 000000000000..c76d4ed8c61b --- /dev/null +++ b/nixos/tests/domination.nix @@ -0,0 +1,26 @@ +import ./make-test-python.nix ({ pkgs, ... }: { + name = "domination"; + meta = with pkgs.lib.maintainers; { + maintainers = [ fgaz ]; + }; + + machine = { config, pkgs, ... }: { + imports = [ + ./common/x11.nix + ]; + + services.xserver.enable = true; + environment.systemPackages = [ pkgs.domination ]; + }; + + enableOCR = true; + + testScript = + '' + machine.wait_for_x() + machine.execute("domination >&2 &") + machine.wait_for_window("Menu") + machine.wait_for_text("New Game") + machine.screenshot("screen") + ''; +}) diff --git a/pkgs/games/domination/default.nix b/pkgs/games/domination/default.nix index 2fc4f8d36cb4..0dde8ab16413 100644 --- a/pkgs/games/domination/default.nix +++ b/pkgs/games/domination/default.nix @@ -6,6 +6,7 @@ , ant , makeWrapper , makeDesktopItem +, nixosTests }: let @@ -26,7 +27,7 @@ let in stdenv.mkDerivation { pname = "domination"; - version = "1.2.3"; + version = "1.2.4"; # The .zip releases do not contain the build.xml file src = fetchsvn { @@ -34,8 +35,8 @@ in stdenv.mkDerivation { # There are no tags in the repository. # Look for commits like "new version x.y.z info on website" # or "website update for x.y.z". - rev = "1964"; - sha256 = "0718gns8d69a1dfq3ywc9kddl1khnrmxqyal7brckbjgay8dq42f"; + rev = "2109"; + sha256 = "sha256-awTaEkv0zUXgrKVKuFzi5sgHgrfiNmAFMODO5U0DL6I="; }; nativeBuildInputs = [ @@ -44,7 +45,10 @@ in stdenv.mkDerivation { makeWrapper ]; - buildPhase = "ant"; + buildPhase = '' + cd swingUI + ant + ''; installPhase = '' # Remove unnecessary files and launchers (they'd need to be wrapped anyway) @@ -76,6 +80,10 @@ in stdenv.mkDerivation { install -Dm644 build/game/resources/icon.png $out/share/pixmaps/domination.png ''; + passthru.tests = { + domination-starts = nixosTests.domination; + }; + meta = with lib; { homepage = "http://domination.sourceforge.net/"; downloadPage = "http://domination.sourceforge.net/download.shtml";