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

bug: nixos: 'cargo': no such file or directory #182

Open
TheAwesome98-Real opened this issue Sep 10, 2024 · 4 comments
Open

bug: nixos: 'cargo': no such file or directory #182

TheAwesome98-Real opened this issue Sep 10, 2024 · 4 comments
Labels
bug Something isn't working needs triage This issue need to be triaged

Comments

@TheAwesome98-Real
Copy link

Current Behavior:

doing nix-shell shell.nix --run 'cargo r' results in error: command failed: 'cargo': No such file or directory (os error 2)

Expected Behavior:

it should run

Steps To Reproduce:

  1. clone the repo
  2. cd to it
  3. run nix-shell shell.nix --run 'cargo r'
  4. error: command failed: 'cargo': No such file or directory (os error 2)

Screenshots Or Videos

the terminal showing this error

Environment:

[lily@dawn:~]$ nix-shell -p nix-info --run "nix-info -m"
 - host os: `Linux 6.6.46, NixOS, 24.05 (Uakari), 24.05.4169.797f7dc49e0b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05, nixos-unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Anything else:

this may be a "my environment skill issue" but it's nixos so it shouldn't happen, right?

@TheAwesome98-Real TheAwesome98-Real added bug Something isn't working needs triage This issue need to be triaged labels Sep 10, 2024
@wusyong
Copy link
Member

wusyong commented Sep 11, 2024

Current nix setup is inpure. I guess we can add cargo and rustc in buildInputs

@TheAwesome98-Real
Copy link
Author

oh yeah that's how my shell.nix files are usually set up

@TheAwesome98-Real
Copy link
Author

this appears to not actually be the reason. unless nix opens a shell file when you cd into a directory, something i completely don't understand has happened. in /tmp cargo works, but in /tmp/verso, cargo doesn't. no nix-shell invocation was performed.

@Weathercold
Copy link

Weathercold commented Nov 6, 2024

Can reproduce on non-NixOS distro (Arch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage This issue need to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants