mesonEmulatorHook: make error message agree with code#238484
Conversation
This commit fixes the error thrown by `mesonEmulatorHook` so it agrees with the actual condition that was not met. Discovered during this discussion: #238331 (comment)
sternenseemann
left a comment
There was a problem hiding this comment.
I believe this message is actually correct in a sense—that is the code you'd use at the call site and the hook (which goes in nativeBuildInputs) comes from the previous set.
What should be changed to be totally accurate (but it doesn't matter for any practical case I can think of), is the if— it should be !(stdenv.hostPlatform.canExecute stdenv.targetPlatform) and it should use pkgs, not buildPackages.
|
I think this works correctly at the moment because |
Oh I see. Yeah it could be confusing. We probably shouldn't use the literal Suggested fix: https://github.com/NixOS/nixpkgs/pull/238654/files#r1239559837 |
Description of changes
This commit fixes the error thrown by
mesonEmulatorHookso it agrees with the actual condition that was not met.Discovered during this discussion:
#238331 (comment)
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)