Unverified Commit ee774a6a authored by Maximilian Bosch's avatar Maximilian Bosch Committed by GitHub
Browse files

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

parents 19f2b56e 0010ba25
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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;
      };
    });