Merge: various: fix hostPlatform.canExecute buildPlatform (#367175)

This commit is contained in:
Maximilian Bosch
2024-12-22 21:42:44 +01:00
committed by GitHub
4 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
swig,
systemd,
# ImportError: cannot import name 'mlog' from 'mesonbuild'
withDocs ? stdenv.hostPlatform.canExecute stdenv.buildPlatform,
withDocs ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
}:
stdenv.mkDerivation (finalAttrs: {
+1 -1
View File
@@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec {
installManPage rgr.1
popd
''
+ lib.optionalString (stdenv.hostPlatform.canExecute stdenv.buildPlatform) ''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# As it can be seen here: https://github.com/acheronfail/repgrep/blob/0.15.0/.github/workflows/release.yml#L206, the completions are just the same as ripgrep
installShellCompletion --cmd rgr \
--bash <(${lib.getExe ripgrep} --generate complete-bash | sed 's/-c rg/-c rgr/') \
+1 -1
View File
@@ -251,7 +251,7 @@ stdenv.mkDerivation (finalAttrs: {
${freefont_ttf}/share/fonts/truetype
''
# Upstream luac can't cross compile, so we have to install the lua sources
# instead of bytecode:
# instead of bytecode, which was built for buildPlatform:
# https://www.lua.org/wshop13/Jericke.pdf#page=39
+ lib.optionalString (!stdenv.hostPlatform.canExecute stdenv.buildPlatform) ''
substituteInPlace share/Makefile.am \
+3
View File
@@ -407,6 +407,9 @@ let
# resulting LLVM IR isn't platform-independent this doesn't give you much.
# In fact, I tried to test the result in a VM-test, but as soon as JIT was used to optimize
# a query, postgres would coredump with `Illegal instruction`.
#
# Note: This is "host canExecute build" on purpose, since this is about the LLVM that is called
# to do JIT at **runtime**.
broken = jitSupport && !stdenv.hostPlatform.canExecute stdenv.buildPlatform;
};
});