rust-overlay: restore SYSROOT detection for Darwin#309
rust-overlay: restore SYSROOT detection for Darwin#309ggreif wants to merge 3 commits intomozilla:masterfrom
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.
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 |
Artturin
left a comment
There was a problem hiding this comment.
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 |
Artturin
left a comment
There was a problem hiding this comment.
I don't use this overlay nor can I merge but the code looks ok.
f6fe850 broke Darwin (fixes #304).
This PR:
rmbeforecp(and uses--remove-destinationinstead)librustc_driver-*.dylibtooTakes some cues from #306 (and supersedes it).