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
nim: cross-compilation fixes #115195
nim: cross-compilation fixes #115195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small formatting nit and you might want to set strictDeps = true;
to easier catch regressions for future updates.
@SuperSandro2000 Yes, strictDeps is what I want, thanks. |
I'm having problems getting cross-complation to work where the build platform is GCC and the target platform is Clang. |
3371538
to
114ca02
Compare
"--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${ | ||
placeholder "out" | ||
}/bin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${ | |
placeholder "out" | |
}/bin" | |
"--prefix PATH : ${lib.makeBinPath [ buildPackages.gdb ]}:${placeholder "out"}/bin" |
# is not documented, so duplicate the configuration across both files. | ||
'' | ||
runHook preBuild | ||
cat >> config/config.nims << WTF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if EOF for heredocs are used. That is more common and for everyone easy to spot.
If you need more build power or some testing and some limited help on darwin just hit me up. |
* Import with callPackages * Use buildPackages for building a cross-compiler * Patch-out potential conflicts in nim.cfg * Generate a configuration with toolchain detection * Build with strictDeps enabled
Import with callPackages, use buildPackages for building a cross-compiler, cleanup nim.cfg so that it does not conflict with our configuration.
Motivation for this change
Cross-compilation doesn't work right now, the wrapper takes a Nim compiler built for the targetPlatform.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)