This seems to have been broken for a while. Building rustc with this configuration will fail:
rustc> /build/rustc-1.63.0-src/src/bootstrap/bootstrap.py:5: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
rustc> import distutils.version
rustc> info: using vendored source, but .cargo/config is already present.
rustc> Reusing the current configuration file. But you may want to configure vendoring like this:
rustc> [source.crates-io]
rustc> replace-with = 'vendored-sources'
rustc> registry = 'https://example.com'
rustc> [source.vendored-sources]
rustc> directory = '/build/rustc-1.63.0-src/vendor'
rustc> Building rustbuild
rustc> Finished dev [unoptimized] target(s) in 0.16s
rustc> thread 'main' panicked at 'building std documentation for no_std target thumbv7em-none-eabi is not supported
rustc> Set `docs = false` in the config to disable documentation.', src/bootstrap/doc.rs:435:13
rustc> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
rustc> Build completed unsuccessfully in 0:00:00
rustc> make: *** [Makefile:13: all] Error 1
However that overlay does not apply to the rustPlatform.buildRustPackage I use to build the package. I have tried various permutations of overlaying rustPlatform, but I think I am heading down the wrong path with this (?). Any advice on how to disable docs for rustc is appreciated
Much exploration later I got this to build.
Lots of this is needlessly verbose, hopefully I can find a minimal working set and feed this back to the docs.
Excellent. And I see you’ve begun trimming it in GitHub - newAM/nucleo-wl55jc2-rs at nix. I’ll want to revisit that when I get chance to play with some Cortex-M0 boards, soon I hope.
I’m sure that I did many things the wrong way, but I recently wrote an article on getting nix to compile rust for the ESP32C3 (riscv32). It took me a couple weeks to figure out, so I thought I’d leave a link in case it helps anyone else: https://n8henrie.com/2023/09/compiling-rust-for-the-esp32-with-nix/