mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
20487112ed
Regression introduced by a02bb00156
.
The fix is done by disabling writableStore, because the latter will set
up an overlayfs on the Nix store within the VM, which in turn will
discard all the outputs of the resulting output path.
However in runInMachine we actually *want* the contents of the generated
path and also don't want a writable store within the VM (except of
course for $out, which is writable anyway).
I've added a small regression test to verifify the output in
nixos/tests/run-in-machine.nix to make sure this won't break again in
the future.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
17 lines
477 B
Nix
17 lines
477 B
Nix
{ system ? builtins.currentSystem }:
|
|
|
|
with import ../lib/testing.nix { inherit system; };
|
|
|
|
let
|
|
output = runInMachine {
|
|
drv = pkgs.hello;
|
|
machine = { config, pkgs, ... }: { /* services.sshd.enable = true; */ };
|
|
};
|
|
in 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"
|
|
''
|