refactor(tvix/boot/tests): only use exportReferencesGraph when needed

These fields don't need to be set if isClosure is false.

Change-Id: Id29ed034e0757c61cef09885962dfc5507ca106c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11890
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
Florian Klink 2024-06-29 14:48:09 +03:00 committed by flokli
parent de8340335e
commit 4ded170e97

View file

@ -29,12 +29,9 @@ let
assert isClosure -> importPathName == null;
assert (!isClosure) -> importPathName != null;
pkgs.stdenv.mkDerivation {
pkgs.stdenv.mkDerivation ({
name = "run-vm";
__structuredAttrs = true;
exportReferencesGraph.closure = [ path ];
nativeBuildInputs = [
depot.tvix.store
depot.tvix.boot.runVM
@ -76,7 +73,10 @@ let
grep "${assertVMOutput}" output.txt
'';
requiredSystemFeatures = [ "kvm" ];
};
} // lib.optionalAttrs (isClosure) {
__structuredAttrs = true;
exportReferencesGraph.closure = [ path ];
});
systemFor = sys: (depot.ops.nixos.nixosFor sys).system;