I’ve just upgraded to
nix 2.1 with
nix upgrade-nix, and
nix-channel --update does not work anymore:
% nix-channel --update
error: unsupported builtin function 'buildenv'
builder for '/nix/store/xyqcscjac7bndrb7ycwi374xy6qx0vhw-user-environment.drv' failed with exit code 1
error: build of '/nix/store/xyqcscjac7bndrb7ycwi374xy6qx0vhw-user-environment.drv' failed
error: program '/nix/store/n7fvy0k555gwkkdszdkhi3h0aahca8h3-nix-2.1/bin/nix-env' failed with exit code 100
Is this a bug?
This means nix wasn’t upgraded correctly, I suspect you have 2 versions of nix in PATH and only the first (just client) was upgraded.
No, I have only
nix in my
However, I found out that
nix-channel --update works fine when prefixed with
% sudo nix-channel --update
created 5 symlinks in user environment
That’s a bit confusing…
Strange, could you try these instructions Introduction.
I’ve “fixed” by re-installing ‘nix’ from scratch. I don’t know what happened.
What is the difference between
nix upgrade-nix and the upgrade method that is recommended in the manual (that is
nix-env -iA nixpkgs.nix)?
Hm, I faced the same today.
sudo nix-channel --update once fixed it for me.
Wasn’t that sufficient for your setup as well?