nixpkgs/pkgs/applications/emulators/craftos-pc/test-eval-hello-world/default.nix
Tomo 4851ef974d craftos-pc: fix tests
The tests attempt to import 'grep' with the intention of using
'gnugrep'. This commit resolves that issue.
2023-07-22 19:34:01 -07:00

19 lines
432 B
Nix

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