2
0
Fork 0
genodepkgs/tests/posix.nix

31 lines
788 B
Nix

{
name = "posix";
machine = { pkgs, ... }: {
genode.init.children.posix = with pkgs;
let
script = writeTextFile {
name = "posix.sh";
text = ''
export PATH=${
lib.makeSearchPathOutput "bin" "bin" [ bash hello coreutils ]
}
set -v
time ls -lR /nix
sleep 1
hello -v
sleep 1
uname -a
'';
};
in {
configFile = writeText "posix.child.dhall" ''
${
./posix.dhall
} { bash = "${bash}", coreutils = "${coreutils}", script = "${script}" }
'';
inputs = [ bash hello coreutils ]
++ (with genodePackages; [ cached_fs_rom posix vfs vfs_pipe ]);
};
};
}