Skip to content
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

Setting Rust source path #141

Open
psionic-k opened this issue Mar 12, 2024 · 0 comments
Open

Setting Rust source path #141

psionic-k opened this issue Mar 12, 2024 · 0 comments

Comments

@psionic-k
Copy link

psionic-k commented Mar 12, 2024

The README seems to indicate that having the rust-src attribute in the shell's packages would automatically set RUST_SRC_PATH

rust-src = <derivation>; # RUST_SRC_PATH = "${fenix.complete.rust-src}/lib/rustlib/src/rust/library"

It's a good idea, but it doesn't seem to happen. My toolchain was constructed like so:

          rustToolchain = with pkgs.fenix; combine [
            targets.x86_64-unknown-linux-musl.stable.rust-std
            stable.rust-src
            stable.rustc
            stable.cargo
          ];

And then included in a shell like so:

          shell = pkgs.mkShell
            {
              buildInputs = [
                rustToolchain
                pkgs.pkg-config
                pkgs.libusb1
              ];
              RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
              RUST_BACKTRACE = 1;

              PKG_CONFIG_ALLOW_CROSS=1;
            };

The availability of rustc and cargo within the shell are as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant