I’m new to nix, and just installed it using sh <(curl -L https://nixos.org/nix/install)
. However, it fails from the very start. When just running nix-shell
I get:
warning: Nix search path entry '/Users/ihse/.nix-defexpr/channels' does not exist, ignoring
Trying to get help does not work:
ihse@saturnus:~$ nix-shell --help
No manual entry for nix-shell
and when I tried to use nix-shell to build openconnect-sso (which was the sole reason for me to install nix to begin with), I get this weird error about setuptools
:
ihse@saturnus:~/hacking/openconnect-sso$ nix-shell
warning: Nix search path entry '/Users/ihse/.nix-defexpr/channels' does not exist, ignoring
warning: Nix search path entry '/Users/ihse/.nix-defexpr/channels' does not exist, ignoring
warning: Nix search path entry '/Users/ihse/.nix-defexpr/channels' does not exist, ignoring
error:
… while calling the 'derivationStrict' builtin
at <nix/derivation-internal.nix>:34:12:
33|
34| strict = derivationStrict drvAttrs;
| ^
35|
… while evaluating derivation 'nix-shell'
whose name attribute is located at /nix/store/yqlf9nmfxzpy4p0pzzqd8rs1xvmmxg0s-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:375:7
… while evaluating attribute 'buildInputs' of derivation 'nix-shell'
at /nix/store/yqlf9nmfxzpy4p0pzzqd8rs1xvmmxg0s-nixpkgs/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:422:7:
421| depsHostHost = elemAt (elemAt dependencies 1) 0;
422| buildInputs = elemAt (elemAt dependencies 1) 1;
| ^
423| depsTargetTarget = elemAt (elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: function 'anonymous lambda' called with unexpected argument 'setuptools'
at /nix/store/yqlf9nmfxzpy4p0pzzqd8rs1xvmmxg0s-nixpkgs/nixpkgs/pkgs/development/python-modules/wheel/default.nix:1:1:
1| {
| ^
2| lib,
ihse@saturnus:~/hacking/openconnect-sso$
Something seems messed up with the channels (but I don’t fully grok this nix concept yet). I tried nix-channel --list
and it did not output anything at all, which seems sus.
I have found Nix programs keep saying `warning: Nix search path entry ...` · Issue #2982 · NixOS/nix · GitHub and tried the suggested workarounds:
sudo -i nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
sudo -i nix-channel --update nixpkgs
and
export NIX_PATH=$HOME/.nix-defexpr/channels
but this did not help. I did not try the local repository workaround suggested in a comment since it seemed way too complex.
I’m basically stuck now. Can anyone here help me out?