Merge pull request #145802 from fgaz/domination/1.2.4
domination: 1.2.3 -> 1.2.4, add nixos test
This commit is contained in:
commit
beff4b8178
3 changed files with 39 additions and 4 deletions
|
@ -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 {};
|
||||
|
|
26
nixos/tests/domination.nix
Normal file
26
nixos/tests/domination.nix
Normal file
|
@ -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")
|
||||
'';
|
||||
})
|
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue