mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 19:54:05 +00:00
19 lines
426 B
Nix
19 lines
426 B
Nix
|
{ 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
|
||
|
'';
|
||
|
}
|