Following this previous answer that was given to me, I started following the nixpkgs-unstable channel with a git clone of this repository: https://github.com/NixOS/nixpkgs-channels/
My clone is in
~/nixpkgs. I'm calling
nix-shell with option
-I ~ and it works fine. For
-I option does not exist but I understand that one should instead use the
-f option. So far (on two different machines) I did just that (calling
nix-env with option
-f ~) and it worked fine.
Now, I'm on a third machine and I tried to reproduce the same process. I tried to install a package which is in nixpkgs-unstable but not on my system channel nixos-16.09 with the command
nix-env -f ~ -iA nixpkgs.exercism but it fails with the following error message:
warning: name collision in input Nix expressions, skipping ‘/home/theo/nixpkgs’ error: attribute ‘exercism’ in selection path ‘nixpkgs.exercism’ not found
Searching for this error message gave me this http://lists.science.uu.nl/pipermail/nix-dev/2013-October/011898.html
but I'm not in the situation described. I am not following any channel as a normal user (
nix-channel --list answer is empty) and my only system-wide channel is called nixos (further confirmed by the fact that
.nix-defexpr/ only contains
channels_root/ which in turn contains
What did I do wrong?
To note: I can fix my problem by issuing instead the command
nix-env -f ~/nixpkgs -iA exercism but I still would really like to understand why my first solution did not work (even if it did work on two other machines).