about summary refs log tree commit diff
path: root/tvix/Cargo.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r--tvix/Cargo.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix
index 487a17573aed..dab411ebb863 100644
--- a/tvix/Cargo.nix
+++ b/tvix/Cargo.nix
@@ -11413,7 +11413,7 @@ rec {
             # recreate a file hierarchy as when running tests with cargo
 
             # the source for test data
-            ${pkgs.xorg.lndir}/bin/lndir ${crate.src}
+            ${pkgs.buildPackages.xorg.lndir}/bin/lndir ${crate.src}
 
             # build outputs
             testRoot=target/debug
@@ -11443,10 +11443,12 @@ rec {
           passthru = (crate.passthru or { }) // {
             inherit test;
           };
-        } ''
-        echo tested by ${test}
-        ${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs}
-      '';
+        }
+        (lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
+          echo tested by ${test}
+        '' + ''
+          ${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs}
+        '');
 
     /* A restricted overridable version of builtRustCratesWithFeatures. */
     buildRustCrateWithFeatures =