haskell-nix icon indicating copy to clipboard operation
haskell-nix copied to clipboard

nix-channel list gives no output

Open CThuleHansen opened this issue 6 years ago • 6 comments

Hi.

I am on macOS running with nix 2.0. My nix-channel --list gives not output. What can be the cause of this? Does it just use the unstable without outputting?

After manually adding the unstable pkgs, the output is correct.

CThuleHansen avatar Jul 13 '18 15:07 CThuleHansen

@CThuleHansen: This might be because you have a multi-user Nix installation. Try the following command to see if it works:

$ sudo -i nix-channel --list

This is because the Nix daemon uses the root account's channel since it is designed to run for all users. That's why it ignores your personal channel and there might not even be a personal channel installed by default as you discovered.

Gabriella439 avatar Jul 14 '18 15:07 Gabriella439

I tried this, with the same result. But I have just added the unstable pkgs, so not a big issue. Perhaps worth a mention?

CThuleHansen avatar Aug 07 '18 06:08 CThuleHansen

@CThuleHansen: What is the output of:

$ echo $NIX_PATH

I'm fine mentioning this in the tutorial, but I first want to make sure that we've diagnosed the issue correctly

Gabriella439 avatar Aug 08 '18 02:08 Gabriella439

/nix/var/nix/profiles/per-user/root/channels Otherwise I can remove nix and retry it all

CThuleHansen avatar Aug 08 '18 06:08 CThuleHansen

@CThuleHansen: You might want to check out this issue: https://github.com/NixOS/nix/issues/2008

Gabriella439 avatar Aug 08 '18 18:08 Gabriella439

Ahh interesting. It seems like it has been fixed in an upcoming release. So maybe worth a note until then?

CThuleHansen avatar Aug 09 '18 07:08 CThuleHansen