Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6eadc1100531
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a7888ee7f696
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Jul 29, 2020

  1. pt2-clone: 1.20 -> 1.22

    fgaz committed Jul 29, 2020
    Copy the full SHA
    411e09d View commit details
  2. pt2-clone: add nixos test

    fgaz committed Jul 29, 2020
    Copy the full SHA
    4436c01 View commit details

Commits on Jul 30, 2020

  1. Merge pull request #94183 from fgaz/pt2-clone/1.22

    pt2-clone: 1.20 -> 1.22, add nixos test
    Mic92 authored Jul 30, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a7888ee View commit details
Showing with 43 additions and 2 deletions.
  1. +1 −0 nixos/tests/all-tests.nix
  2. +35 −0 nixos/tests/pt2-clone.nix
  3. +7 −2 pkgs/applications/audio/pt2-clone/default.nix
1 change: 1 addition & 0 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 35 additions & 0 deletions nixos/tests/pt2-clone.nix
Original file line number Diff line number Diff line change
@@ -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")
'';
})

9 changes: 7 additions & 2 deletions pkgs/applications/audio/pt2-clone/default.nix
Original file line number Diff line number Diff line change
@@ -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";