diff options
author | Artturin <Artturin@artturin.com> | 2022-07-07 21:29:21 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2022-07-07 21:29:53 +0300 |
commit | 2cbce6b01297b623dc7d098e39b78e6935c11569 (patch) | |
tree | d229e611bdfcbbeab4e665da7638de4495c50f34 /doc/stdenv | |
parent | 71cbf3b809b5a380d3434171ba5caabffdafb919 (diff) |
mesonEmulatorHook: check if the target binaries can be executed
this prevents having to bring in the emulator when compiling e.g. pkgsStatic
Diffstat (limited to 'doc/stdenv')
-rw-r--r-- | doc/stdenv/cross-compilation.chapter.md | 4 |
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 ]; ``` |