about summary refs log tree commit diff
path: root/pkgs/applications/emulators/craftos-pc/test-eval-periphemu/default.nix
blob: ad5cf97401a0098c07ba1f7b005d0c1119d2ad4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ stdenv
, craftos-pc
, grep
}:
stdenv.mkDerivation {
  name = "craftos-pc-test-eval-periphemu";
  meta.timeout = 60;
  nativeBuildInputs = [ craftos-pc grep ];
  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
  '';
}