about summary refs log tree commit diff
path: root/pkgs/applications/emulators/craftos-pc/test-eval-periphemu/default.nix
blob: af1cca9c27a7529e0372d48d1e24154f7ff12323 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ stdenv
, craftos-pc
, gnugrep
}:
stdenv.mkDerivation {
  name = "craftos-pc-test-eval-periphemu";
  meta.timeout = 60;
  nativeBuildInputs = [ craftos-pc gnugrep ];
  buildCommand = ''
    export HOME=$(pwd)
    mkdir $HOME/.local $HOME/.config
    export XDG_CONFIG_DIR=$HOME/.config
    export XDG_DATA_DIR=$HOME/.local
    if craftos --headless --script ${./init.lua} | grep -q "FAIL"; then
        exit 1
    fi
    touch $out
  '';
}