Nixpkgs: rustPlatform and nightly

I’m trying to fix the polars package.

The first stumbling block is that it requires a nightly Rust toolchain:

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /build/polars-0.13.19-vendor.tar.gz/arrow2/src/lib.rs:8:39
  |
8 | #![cfg_attr(feature = "simd", feature(portable_simd))]
  |    

I see that some packages use RUSTC_BOOTSTRAP = 1; to provide nightly features. I don’t really understand exactly what this does, or what its full implications are, but a quick experiment shows that it gets me past the immediate need-nightly problem in polars. (Other problems remain.)

What should I know about RUSTC_BOOTSTRAP = 1; in the context of nixpkgs? Is it a good/acceptable solution? If not, what is the recommended way of using a nightly toolchain with rustPlatform?

The alternative to nightly is to disable simd for now by patching that line.

Yes, I had considered that, but I’d like to keep SIMD, if it’s not too much work.

Adding RUSTC_BOOTSTRAP = 1; seems to have been a trivial fix to that particular problem (and, as plenty of other packages do it, it might not be completely crazy).

If it does turn out to be crazy, I’ll probably try to use the oxalica (or mozilla) overlay, but it’s far from clear to me how to use those with rustPlatform.