I know that if using flakes nix shell
is the right command. But I just want to know that is it normal for legacy commands to not work like that one? nix-env works tho.
nix shell nixpkgs#nix-info
nix-info
- And the output value is this
- system: `"x86_64-linux"`
- host os: `Linux 6.1.86, NixOS, 23.11 (Tapir), 23.11.20240417.e402c3e`
- multi-user?: `no`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- nixpkgs: `not found`
error:
… while calling anonymous lambda
at «string»:1:1:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (nix-info) ]; } ""
| ^
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
at «none»:0: (source not available)
Actually this happened. I just read this issue https://github.com/Misterio77/nix-starter-configs/pull/73