From df177cf39b6d9e1a10967079cb32970401d91a25 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 13 Nov 2021 17:49:46 +0100 Subject: [PATCH 1/2] domination: 1.2.3 -> 1.2.4 --- pkgs/games/domination/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/games/domination/default.nix b/pkgs/games/domination/default.nix index 2fc4f8d36cb4..e73b563c0afa 100644 --- a/pkgs/games/domination/default.nix +++ b/pkgs/games/domination/default.nix @@ -26,7 +26,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 +34,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 +44,10 @@ in stdenv.mkDerivation { makeWrapper ]; - buildPhase = "ant"; + buildPhase = '' + cd swingUI + ant + ''; installPhase = '' # Remove unnecessary files and launchers (they'd need to be wrapped anyway) From df99f2326ee60ea5e44ecea403f92d98313e1a1f Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Sat, 13 Nov 2021 23:00:20 +0100 Subject: [PATCH 2/2] nixosTests.domination: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/domination.nix | 26 ++++++++++++++++++++++++++ pkgs/games/domination/default.nix | 5 +++++ 3 files changed, 32 insertions(+) create mode 100644 nixos/tests/domination.nix 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 e73b563c0afa..0dde8ab16413 100644 --- a/pkgs/games/domination/default.nix +++ b/pkgs/games/domination/default.nix @@ -6,6 +6,7 @@ , ant , makeWrapper , makeDesktopItem +, nixosTests }: let @@ -79,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";