diff options
author | Johannes Maier <johannes.maier@mailbox.org> | 2022-06-15 23:22:33 +0200 |
---|---|---|
committer | Johannes Maier <johannes.maier@mailbox.org> | 2022-06-15 23:37:26 +0200 |
commit | 44feda004bda00a55a3d5d496756e4f5f1544e6c (patch) | |
tree | 986e461fe9aa5cfcbc00a269127174085a54054e /pkgs/games | |
parent | 3876d5324247a47545f8c82a7826ec93933ee87f (diff) |
sil-q: add a test
Check whether creating the save directory works (as a test in passthru.tests).
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/sil-q/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/games/sil-q/default.nix b/pkgs/games/sil-q/default.nix index 1676f8da55a90..e4299bd8aca73 100644 --- a/pkgs/games/sil-q/default.nix +++ b/pkgs/games/sil-q/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, writeScript, makeWrapper, ncurses, libX11 }: +{ pkgs, lib, stdenv, fetchFromGitHub, writeScript, makeWrapper, ncurses, libX11 }: let setup = writeScript "setup" '' @@ -47,6 +47,13 @@ in stdenv.mkDerivation rec { runHook postInstall ''; + passthru.tests = { + saveDirCreation = pkgs.runCommand "save-dir-creation" {} '' + HOME=$(pwd) ${lib.getExe pkgs.sil-q} --help + test -d .sil && touch $out + ''; + }; + meta = { description = "A roguelike game set in the First Age of Middle-earth"; longDescription = '' |