2018-11-11 00:41:11 -08:00
|
|
|
{ system ? builtins.currentSystem,
|
|
|
|
config ? {},
|
|
|
|
pkgs ? import ../.. { inherit system config; }
|
|
|
|
}:
|
2011-01-13 02:54:07 -08:00
|
|
|
|
2020-02-13 23:50:55 -08:00
|
|
|
with import ../lib/testing-python.nix { inherit system pkgs; };
|
2011-01-13 02:54:07 -08:00
|
|
|
|
2017-10-11 11:01:45 -07:00
|
|
|
let
|
|
|
|
output = runInMachine {
|
|
|
|
drv = pkgs.hello;
|
2018-07-20 13:56:59 -07:00
|
|
|
machine = { ... }: { /* services.sshd.enable = true; */ };
|
2017-10-11 11:01:45 -07:00
|
|
|
};
|
2018-12-06 20:56:53 -08:00
|
|
|
|
|
|
|
test = pkgs.runCommand "verify-output" { inherit output; } ''
|
|
|
|
if [ ! -e "$output/bin/hello" ]; then
|
|
|
|
echo "Derivation built using runInMachine produced incorrect output:" >&2
|
|
|
|
ls -laR "$output" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
"$output/bin/hello" > "$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
in test // { inherit test; } # To emulate behaviour of makeTest
|