2
0
Fork 0
genodepkgs/tests/posix.nix

35 lines
900 B
Nix
Raw Normal View History

# SPDX-License-Identifier: CC0-1.0
{ testEnv, pkgs, legacyPackages, ... }:
with pkgs;
2020-05-29 18:34:45 +02:00
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 testEnv.mkTest rec {
name = "posix";
2020-05-29 18:34:45 +02:00
testConfig = ''
${
./posix.dhall
} { bash = \"${bash}\", coreutils = \"${coreutils}\", script = \"${script}\" }'';
testInputs = map pkgs.genodeSources.depot [ "libc" "posix" "vfs_pipe" "vfs" ]
++ [ bash ];
extraPaths = [ script ] ++ (with legacyPackages; [ coreutils hello ]);
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ehmry ];
}