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: fix dynamic library loading, wrap for cross-compilation #95692
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.
This is great, tested mosdepth successfully. I hope the patch gets merged upstream.
I've pushed a second commit that wraps the compiler for cross-compilation, but at the moment I don't have access to the right hardware to test cross-compilation. This adds |
For cross a test could be added that uses a qemu emulator. See e.g. https://github.com/NixOS/nixpkgs/blob/master/pkgs/test/cross/default.nix. |
@@ -9277,6 +9277,8 @@ in | |||
mozart2-binary = callPackage ../development/compilers/mozart/binary.nix { }; | |||
|
|||
nim = callPackage ../development/compilers/nim { }; | |||
nim-unwrapped = nim.unwrapped; |
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.
Do these need to be listed at top-level?
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 listed those at the top-level so that callPackage
feeds them back to the nim-wrapper. I did this because I want to be able to patch the stdlib from an overaly without rebuilding the compiler, just the wrapper. Not sure this is the best way to do this.
Unfortunately I only found two packages in the tree to cross-compile, one has a dependency that is broken for cross-compiles and the other is quite expensive to build. I've used this method to cross-compile Nim from Linux to Genode so I think it should work, and if it doesn't I'll fix it eventually. |
Now Nimble gives me the dreaded
|
Motivation for this change
See nim-lang/Nim#15194.
Wait for nim-lang/Nim#15196 to close.
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)