sigil/tests/posix.nix
Emery Hemingway 2afd2d08cc nixos: add genode.init.children.<…>.binary option
Require that all init children declared by Nix be declared with
an absolute path to the program binary.
2021-02-16 15:46:14 +01:00

35 lines
810 B
Nix

{ pkgs, legacyPackages, ... }:
with pkgs;
let
inherit (legacyPackages) bash coreutils;
script = with legacyPackages;
writeTextFile {
name = "posix.sh";
text = ''
export PATH=${
lib.makeSearchPathOutput "bin" "bin"
(with legacyPackages; [ bash hello coreutils ])
}
set -v
time ls -lR /nix
sleep 1
hello -v
sleep 1
uname -a
'';
};
in rec {
name = "posix";
machine = {
config = ''
${
./posix.dhall
} { bash = \"${bash}\", coreutils = \"${coreutils}\", script = \"${script}\" }'';
extraInputs =
map pkgs.genodeSources.depot [ "libc" "posix" "vfs_pipe" "vfs" ]
++ [ bash ];
extraPaths = [ script ] ++ (with legacyPackages; [ coreutils hello ]);
};
}