versotile-org / verso

A web browser that plays old world blues to build new world hope
Apache License 2.0
4.64k stars 157 forks source link

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

Open TheAwesome98-Real opened 1 month ago

TheAwesome98-Real commented 1 month ago

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?

wusyong commented 1 month ago

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

TheAwesome98-Real commented 1 month ago

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

TheAwesome98-Real commented 1 month ago

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.