2020-05-07 21:45:55 +02:00
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
|
2020-05-08 06:02:23 +02:00
|
|
|
{ testEnv, pkgs, legacyPackages, ... }:
|
2020-05-07 21:45:55 +02:00
|
|
|
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 {
|
2020-05-07 21:45:55 +02:00
|
|
|
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 ]);
|
2020-05-07 21:45:55 +02:00
|
|
|
meta.maintainers = with pkgs.stdenv.lib.maintainers; [ ehmry ];
|
|
|
|
}
|