I’m new to Nix and try to build a Rust app for the target “x86_x64-unknown-uefi”. In order to achieve this, I need the
build-std-feature of Cargo. This means, that Cargo cross compiles Rusts own libraries (core, alloc) itself. To achieve this, Cargo fetches data from
I use naersk (GitHub - nmattia/naersk: Build rust crates in Nix. No configuration, no code generation, no IFD. Sandbox friendly.) to build my Rust app with Nix. During the build inside a Nix shell, it complains that /nix/store/751qp25wf6iblrjprpxsq6h8hlgxd8c2-rust-1.54.0-nightly-2021-05-09-ca82264ec/lib/rustlib/src is not available (only src, the last component) is missing.
How/where can I specify that “rust-src” must be included? The following code example is the template I used, therefore my Nix files are almost identical to it: hello-rust-nix/helloworld.nix at b23bc8701fb5fab21997f8aa2b7c95437cf4e598 · nasirhm/hello-rust-nix · GitHub
My repository GitHub - phip1611/rust-hello-world-uefi-nix: A hello world UEFI-Application written in Rust that gets packaged with Nix.
(the relevant part is only that it should build a Rust binary for the target x86_64-unknown-uefi.)
I’m looking forward to your help