mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-11 15:08:33 +01:00
Merge pull request #94183 from fgaz/pt2-clone/1.22
pt2-clone: 1.20 -> 1.22, add nixos test
This commit is contained in:
commit
a7888ee7f6
|
@ -285,6 +285,7 @@ in
|
|||
prosody = handleTest ./xmpp/prosody.nix {};
|
||||
prosodyMysql = handleTest ./xmpp/prosody-mysql.nix {};
|
||||
proxy = handleTest ./proxy.nix {};
|
||||
pt2-clone = handleTest ./pt2-clone.nix {};
|
||||
qboot = handleTestOn ["x86_64-linux" "i686-linux"] ./qboot.nix {};
|
||||
quagga = handleTest ./quagga.nix {};
|
||||
quorum = handleTest ./quorum.nix {};
|
||||
|
|
35
nixos/tests/pt2-clone.nix
Normal file
35
nixos/tests/pt2-clone.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "pt2-clone";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ fgaz ];
|
||||
};
|
||||
|
||||
machine = { config, pkgs, ... }: {
|
||||
imports = [
|
||||
./common/x11.nix
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
sound.enable = true;
|
||||
environment.systemPackages = [ pkgs.pt2-clone ];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript =
|
||||
''
|
||||
machine.wait_for_x()
|
||||
# Add a dummy sound card, or the program won't start
|
||||
machine.execute("modprobe snd-dummy")
|
||||
|
||||
machine.execute("pt2-clone &")
|
||||
|
||||
machine.wait_for_window(r"ProTracker")
|
||||
machine.sleep(5)
|
||||
# One of the few words that actually get recognized
|
||||
if "LENGTH" not in machine.get_screen_text():
|
||||
raise Exception("Program did not start successfully")
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
})
|
||||
|
|
@ -1,24 +1,29 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, nixosTests
|
||||
, alsaLib
|
||||
, SDL2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pt2-clone";
|
||||
version = "1.20";
|
||||
version = "1.22";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "8bitbubsy";
|
||||
repo = "pt2-clone";
|
||||
rev = "v${version}";
|
||||
sha256 = "0s4yk8w19qa58n5p558n6m7d5mslr9h9z5q3ayrgqcchdlm8cfky";
|
||||
sha256 = "1w6lbq4366bawy975glvjizk57zhvl562xhxwzn7p5hpm2bvw09b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ SDL2 ] ++ stdenv.lib.optional stdenv.isLinux alsaLib;
|
||||
|
||||
passthru.tests = {
|
||||
pt2-clone-opens = nixosTests.pt2-clone;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A highly accurate clone of the classic ProTracker 2.3D software for Amiga";
|
||||
homepage = "https://16-bits.org/pt2.php";
|
||||
|
|
Loading…
Reference in a new issue