Open SuperSandro2000 opened 4 months ago
Did it use to work?
This looks like the broken semantics “documented” in https://github.com/NixOS/nix/pull/9066
(not saying it's not an issue, just clarifying whether this is the same old bug or a real regression)
Did it use to work?
As soon as I switch back to 2.20 or 2.18 by changing nix.package
it starts to work again.
Weird, I can reproduce that for every Nix version >= 2.4 (2.3 works, but that's just because it doesn't have the nix-path
setting)
I see identical behavior on 2.18.1.
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)
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)
Same with me. @nasrally , do you have any workaround, except nix-shell -I nixpkgs=...
?
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
output nix-env (Nix) 2.21.0Additional context
Add any other context about the problem here.
Priorities
Add :+1: to issues you find important.