-
Notifications
You must be signed in to change notification settings - Fork 129
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
rust-overlay: restore SYSROOT detection for Darwin #309
base: master
Are you sure you want to change the base?
Conversation
and a few deps too needs patched toolset from mozilla (PRs submitted: mozilla/nixpkgs-mozilla#309)
and a few deps too: - `wasi-libc` needs patched toolset from mozilla (PRs submitted: mozilla/nixpkgs-mozilla#309) TODO: - [x] `motoko-rts-test` fails in `stream flushing` with unaligned memory access — see #3981
Bump for attention. |
Unfortunately, this does not work this way … |
rust-overlay.nix
Outdated
# Here we copy the librustc_driver-*.{so,dylib} to our derivation. | ||
# The SYSROOT is determined based on the path of this library. | ||
if ls $out/lib/librustc_driver-*.so &> /dev/null; then | ||
RUSTC_DRIVER_PATH=$(realpath -e $out/lib/librustc_driver-*.so) | ||
rm $out/lib/librustc_driver-*.so | ||
cp $RUSTC_DRIVER_PATH $out/lib/ | ||
fi | ||
shopt -s nullglob | ||
RUSTC_DRIVER_PATH=$(realpath -e $out/lib/librustc_driver-*.{so,dylib}) | ||
cp --remove-destination $RUSTC_DRIVER_PATH $out/lib/ |
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.
Shouldn't this file be copied before the loop which is using conditionally checking whether this file exists before using patchelf?
Looks like #304 has fixed this, so closing for now. |
Unfortunately |
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.
There's stdenv.hostPlatform.extensions.sharedLibrary
so no need for duplication
…ed copying this is review feedback, thanks!
@AliSajid I am using this branch as |
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 don't use this overlay nor can I merge but the code looks ok.
f6fe850 broke Darwin (fixes #304).
This PR:
rm
beforecp
(and uses--remove-destination
instead)librustc_driver-*.dylib
tooTakes some cues from #306 (and supersedes it).