about summary refs log tree commit diff
path: root/doc/stdenv
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2022-07-12 16:14:46 +0300
committerGitHub <noreply@github.com>2022-07-12 16:14:46 +0300
commit4427b7dfabc4586b90a7afe3e3085f7e9b2909c2 (patch)
tree19f4eda3d74814220967671e5db994d7d2d71741 /doc/stdenv
parentb2fe1ecd272328d3f89420bc1db86480373ebe22 (diff)
parent20642e2ab0c278f1e51ca2e63ec0836f91b5451d (diff)
Merge pull request #177538 from Artturin/fixcross3
Diffstat (limited to 'doc/stdenv')
-rw-r--r--doc/stdenv/cross-compilation.chapter.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/stdenv/cross-compilation.chapter.md b/doc/stdenv/cross-compilation.chapter.md
index 7b8f2b4ce6cdb..0eff70de5ca1d 100644
--- a/doc/stdenv/cross-compilation.chapter.md
+++ b/doc/stdenv/cross-compilation.chapter.md
@@ -155,14 +155,14 @@ doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
 
 #### Package using Meson needs to run binaries for the host platform during build. {#cross-meson-runs-host-code}
 
-Add `mesonEmulatorHook` cross conditionally to `nativeBuildInputs`.
+Add `mesonEmulatorHook` to `nativeBuildInputs` conditionally on if the target binaries can be executed.
 
 e.g.
 
 ```
 nativeBuildInputs = [
   meson
-] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
+] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
   mesonEmulatorHook
 ];
 ```