You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz command nix-shell --option nix-path "" -p bash I am only greeted with
error:
… while calling the 'import' builtin
at «string»:1:18:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (bash) ]; } ""
| ^
… while realising the context of a path
… while calling the 'findFile' builtin
at «string»:1:25:
1| {...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ (bash) ]; } ""
| ^
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
but command nix-shell --option nix-path nixpkgs=https://github.com/SuperSandro2000/nixpkgs/archive/nixos-unstable.tar.gz -p bash works as expected
Steps To Reproduce
Run NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz command nix-shell --option nix-path "" -p bash
NIX_PATH is completely ignored by nix-shell yet it is present in the environment variables, I can see it in /proc/PID/environ, defining the nix-path setting in either /etc/nix/nix.conf (through NixOS), $HOME/.config/nix/nix.conf (through HM) or --option nix-path nixpkgs=... DOES WORK.
Maybe important context that makes this unrelated — it started doing that after I disabled channels on NixOS with nix.channel.enable = false (because I want complete flakification)
Describe the bug
When running
NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz command nix-shell --option nix-path "" -p bash
I am only greeted withbut
command nix-shell --option nix-path nixpkgs=https://github.com/SuperSandro2000/nixpkgs/archive/nixos-unstable.tar.gz -p bash
works as expectedSteps To Reproduce
NIX_PATH=nixpkgs=https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz command nix-shell --option nix-path "" -p bash
Expected behavior
It should work as it did with 2.20 or 2.18.
nix-env --version
outputnix-env (Nix) 2.21.0
Additional context
Add any other context about the problem here.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: