Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various: fix hostPlatform.canExecute buildPlatform #367175

Merged
merged 1 commit into from
Dec 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/by-name/li/libnvme/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/re/repgrep/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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/') \
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/vl/vlc/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 3 additions & 0 deletions pkgs/servers/sql/postgresql/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
});
Expand Down
Loading