Fix applying overrides to defaultCrateOverrides when cross-compiling#266
Fix applying overrides to defaultCrateOverrides when cross-compiling#266lopsided98 wants to merge 1 commit intonix-community:masterfrom
Conversation
When cross-compiling, there are different versions of defaultCrateOverrides for each platform. This causes buildRustCrateWithFeatures to think the user has passed a custom value of crateOverrides when cross-compiling, which prevents defaultCrateOverrides from being applied. To fix this, use a null default for crateOverrides to detect whether the user has actually specified a value.
|
I just realized that this will cause the top-level |
|
@lopsided98 yes this has bugged me too --- and I am glad you trying out cross stuff again! So the thing that has been bugging me is that I think we do that, and the knot will start to untangle and it will become clear what But fixing that is easier said that done, sadly. |
When cross-compiling, there are different versions of
defaultCrateOverridesfor each platform. This causesbuildRustCrateWithFeaturesto think the user has passed a custom value ofcrateOverrides, which prevents the normaldefaultCrateOverridesfrom being applied. To fix this, use a null default forcrateOverridesto detect whether the user has actually specified a value.This issue can be reproduced by applying a crate override as described here: https://github.com/kolloch/crate2nix#patching-crate-derivations-with-crateoverrides, and then attempting to cross-compile the package. The overrides will not be applied.