diff options
-rw-r--r-- | pkgs/aszlig/psi/default.nix | 10 | ||||
-rw-r--r-- | tests/aszlig/programs/psi.nix | 26 | ||||
-rw-r--r-- | tests/default.nix | 1 |
3 files changed, 28 insertions, 9 deletions
diff --git a/pkgs/aszlig/psi/default.nix b/pkgs/aszlig/psi/default.nix index 94e1ba1c..d0e24c05 100644 --- a/pkgs/aszlig/psi/default.nix +++ b/pkgs/aszlig/psi/default.nix @@ -54,7 +54,7 @@ in stdenv.mkDerivation rec { ]; enableParallelBuilding = true; - nativeBuildInputs = [ cmake makeWrapper ]; + nativeBuildInputs = [ cmake makeWrapper qt5.wrapQtAppsHook ]; buildInputs = [ hunspell libgcrypt @@ -69,12 +69,4 @@ in stdenv.mkDerivation rec { qt5.qtwebengine qt5.qtx11extras ]; - - postInstall = let - inherit (qt5.qtbase) qtPluginPrefix; - qtPlugins = "${qt5.qtbase}/${qtPluginPrefix}"; - in '' - wrapProgram "$out/bin/psi" \ - --suffix QT_PLUGIN_PATH : ${lib.escapeShellArg qtPlugins} - ''; } diff --git a/tests/aszlig/programs/psi.nix b/tests/aszlig/programs/psi.nix new file mode 100644 index 00000000..5ab34da3 --- /dev/null +++ b/tests/aszlig/programs/psi.nix @@ -0,0 +1,26 @@ +{ nixpkgsPath, ... }: + +{ + name = "psi-test"; + + machine = { pkgs, ... }: { + imports = [ + "${nixpkgsPath}/nixos/tests/common/user-account.nix" + "${nixpkgsPath}/nixos/tests/common/x11.nix" + ]; + services.xserver.displayManager.auto.enable = true; + services.xserver.displayManager.auto.user = "alice"; + environment.systemPackages = [ pkgs.vuizvui.aszlig.psi ]; + }; + + enableOCR = true; + + testScript = '' + $machine->waitForX; + $machine->waitForFile("/home/alice/.Xauthority"); + $machine->succeed("xauth merge ~alice/.Xauthority"); + $machine->succeed('su -c "DISPLAY=:0.0 psi" - alice &'); + $machine->waitForText(qr/Register new account/i); + $machine->screenshot('psi'); + ''; +} diff --git a/tests/default.nix b/tests/default.nix index 5e9355e0..edc022ad 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -10,6 +10,7 @@ let in { aszlig.dnyarri.luks2-bcache = callTest ./aszlig/dnyarri/luks2-bcache.nix; + aszlig.programs.psi = callTest aszlig/programs/psi.nix; games = { starbound = callTest ./games/starbound.nix; }; |