about summary refs log tree commit diff
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2021-10-02 14:02:47 +0200
committersternenseemann <sternenseemann@systemli.org>2022-05-23 21:25:04 +0200
commit41485e7337baca768dc542c553a9d66030df7b33 (patch)
tree6e6edd2198c5cebf1e4d4aea8369a374b53b0c04 /pkgs/stdenv
parentacb063701a6a209a514bbdefacc9bce22332ef60 (diff)
stdenv.mkDerivation: be less strict about check execution for cross
Instead of requiring the platforms be equal, use `isCompatible` to
determine if we can execute tests. The upside of this is that we now
can execute tests for natively cross compiled package sets like
pkgsStatic, pkgsLLVM and pkgsCross.musl64 etc.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/make-derivation.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix
index ed457019c558e..395c1586a26b4 100644
--- a/pkgs/stdenv/generic/make-derivation.nix
+++ b/pkgs/stdenv/generic/make-derivation.nix
@@ -167,8 +167,8 @@ makeOverlayable (overrideAttrs:
 let
   # TODO(@oxij, @Ericson2314): This is here to keep the old semantics, remove when
   # no package has `doCheck = true`.
-  doCheck' = doCheck && stdenv.hostPlatform == stdenv.buildPlatform;
-  doInstallCheck' = doInstallCheck && stdenv.hostPlatform == stdenv.buildPlatform;
+  doCheck' = doCheck && stdenv.buildPlatform.canExecute stdenv.hostPlatform;
+  doInstallCheck' = doInstallCheck && stdenv.buildPlatform.canExecute stdenv.hostPlatform;
 
   separateDebugInfo' = separateDebugInfo && stdenv.hostPlatform.isLinux && !(stdenv.hostPlatform.useLLVM or false);
   outputs' = outputs ++ lib.optional separateDebugInfo' "debug";