about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-06-29T11·48+0300
committerflokli <flokli@flokli.de>2024-06-29T16·38+0000
commit4ded170e97ff7dbfa054f9234badd0b46773d90f (patch)
tree1228f4f197782f970aa9e8b3bea49a7ad2ad9a20
parentde8340335ead88951147e269629565fdf59d6c32 (diff)
refactor(tvix/boot/tests): only use exportReferencesGraph when needed r/8321
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>
-rw-r--r--tvix/boot/tests/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/tvix/boot/tests/default.nix b/tvix/boot/tests/default.nix
index 5c7f97a1cea3..a46341c08bcd 100644
--- a/tvix/boot/tests/default.nix
+++ b/tvix/boot/tests/default.nix
@@ -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;