From 4ded170e97ff7dbfa054f9234badd0b46773d90f Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 29 Jun 2024 14:48:09 +0300 Subject: 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 Reviewed-by: Connor Brewster --- tvix/boot/tests/default.nix | 10 +++++----- 1 file 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; -- cgit 1.4.1