Merge pull request #145802 from fgaz/domination/1.2.4

domination: 1.2.3 -> 1.2.4, add nixos test

authored by

Thiago Kenji Okada and committed by
GitHub
beff4b81 fd9cbb1b

+39 -4
+1
nixos/tests/all-tests.nix
··· 109 docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {}; 110 documize = handleTest ./documize.nix {}; 111 dokuwiki = handleTest ./dokuwiki.nix {}; 112 dovecot = handleTest ./dovecot.nix {}; 113 ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {}; 114 ec2-nixops = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-nixops or {};
··· 109 docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {}; 110 documize = handleTest ./documize.nix {}; 111 dokuwiki = handleTest ./dokuwiki.nix {}; 112 + domination = handleTest ./domination.nix {}; 113 dovecot = handleTest ./dovecot.nix {}; 114 ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {}; 115 ec2-nixops = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-nixops or {};
+26
nixos/tests/domination.nix
···
··· 1 + import ./make-test-python.nix ({ pkgs, ... }: { 2 + name = "domination"; 3 + meta = with pkgs.lib.maintainers; { 4 + maintainers = [ fgaz ]; 5 + }; 6 + 7 + machine = { config, pkgs, ... }: { 8 + imports = [ 9 + ./common/x11.nix 10 + ]; 11 + 12 + services.xserver.enable = true; 13 + environment.systemPackages = [ pkgs.domination ]; 14 + }; 15 + 16 + enableOCR = true; 17 + 18 + testScript = 19 + '' 20 + machine.wait_for_x() 21 + machine.execute("domination >&2 &") 22 + machine.wait_for_window("Menu") 23 + machine.wait_for_text("New Game") 24 + machine.screenshot("screen") 25 + ''; 26 + })
+12 -4
pkgs/games/domination/default.nix
··· 6 , ant 7 , makeWrapper 8 , makeDesktopItem 9 }: 10 11 let ··· 26 27 in stdenv.mkDerivation { 28 pname = "domination"; 29 - version = "1.2.3"; 30 31 # The .zip releases do not contain the build.xml file 32 src = fetchsvn { ··· 34 # There are no tags in the repository. 35 # Look for commits like "new version x.y.z info on website" 36 # or "website update for x.y.z". 37 - rev = "1964"; 38 - sha256 = "0718gns8d69a1dfq3ywc9kddl1khnrmxqyal7brckbjgay8dq42f"; 39 }; 40 41 nativeBuildInputs = [ ··· 44 makeWrapper 45 ]; 46 47 - buildPhase = "ant"; 48 49 installPhase = '' 50 # Remove unnecessary files and launchers (they'd need to be wrapped anyway) ··· 75 "$out/share/applications/Domination Map Editor.desktop" 76 install -Dm644 build/game/resources/icon.png $out/share/pixmaps/domination.png 77 ''; 78 79 meta = with lib; { 80 homepage = "http://domination.sourceforge.net/";
··· 6 , ant 7 , makeWrapper 8 , makeDesktopItem 9 + , nixosTests 10 }: 11 12 let ··· 27 28 in stdenv.mkDerivation { 29 pname = "domination"; 30 + version = "1.2.4"; 31 32 # The .zip releases do not contain the build.xml file 33 src = fetchsvn { ··· 35 # There are no tags in the repository. 36 # Look for commits like "new version x.y.z info on website" 37 # or "website update for x.y.z". 38 + rev = "2109"; 39 + sha256 = "sha256-awTaEkv0zUXgrKVKuFzi5sgHgrfiNmAFMODO5U0DL6I="; 40 }; 41 42 nativeBuildInputs = [ ··· 45 makeWrapper 46 ]; 47 48 + buildPhase = '' 49 + cd swingUI 50 + ant 51 + ''; 52 53 installPhase = '' 54 # Remove unnecessary files and launchers (they'd need to be wrapped anyway) ··· 79 "$out/share/applications/Domination Map Editor.desktop" 80 install -Dm644 build/game/resources/icon.png $out/share/pixmaps/domination.png 81 ''; 82 + 83 + passthru.tests = { 84 + domination-starts = nixosTests.domination; 85 + }; 86 87 meta = with lib; { 88 homepage = "http://domination.sourceforge.net/";