about summary refs log tree commit diff
path: root/pkgs/applications/emulators/craftos-pc/test-eval-hello-world/default.nix
blob: b2d887428a0e94568c30a9e920fca255160ef649 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ stdenv
, craftos-pc
, grep
}:

stdenv.mkDerivation {
  name = "craftos-pc-test-eval-hello-world";
  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
    craftos --headless --script ${./init.lua} | grep "Hello Nixpkgs!" > /dev/null
    touch $out
  '';
}