Skip to content

error: path '/nix/var/nix/profiles/per-user/root/channels' is a symlink #262

@samuelmarquis

Description

@samuelmarquis

New to NixOS, fresh (modulo some fiddling to get sway working) install. I tried adding nix-index as a package, but when I run the nix-index command I get this (after a few minutes on querying packages):

+ querying available packages
error: querying available packages failed
caused by: nix-env failed with error: nix-env failed with exit status: 1:
error:
       … while querying the derivation named 'nixpkgs-manual'

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:44:19:
           43|       value = commonAttrs // {
           44|         outPath = builtins.getAttr outputName strict;
             |                   ^
           45|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: path '/nix/var/nix/profiles/per-user/root/channels' is a symlink

Switched from adding as a package to using programs.nix-index.enable = true, but the issue persists.

Google turned up absolutely nothing, so I'm not sure what to make of this.

Here's the output with --show-trace:

error:
       … while querying the derivation named 'nixpkgs-manual'

       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:44:19:
           43|       value = commonAttrs // {
           44|         outPath = builtins.getAttr outputName strict;
             |                   ^
           45|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'nixpkgs-manual'
         whose name attribute is located at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/stdenv/generic/make-derivation.nix:1:12605

       … while evaluating attribute 'buildPhase' of derivation 'nixpkgs-manual'
         at /nix/var/nix/profiles/per-user/root/channels/nixos/doc/doc-support/package.nix:1:987:
       … while calling the 'getAttr' builtin
         at <nix/derivation-internal.nix>:44:19:
           43|       value = commonAttrs // {
           44|         outPath = builtins.getAttr outputName strict;
             |                   ^
           45|         drvPath = strict.drvPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'nixpkgs-lib-docs'
         whose name attribute is located at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/stdenv/generic/make-derivation.nix:1:12605

       … while evaluating attribute 'src' of derivation 'nixpkgs-lib-docs'
         at /nix/var/nix/profiles/per-user/root/channels/nixos/doc/doc-support/lib-function-docs.nix:1:2062:
       … from call site
         at /nix/var/nix/profiles/per-user/root/channels/nixos/doc/doc-support/lib-function-docs.nix:1:2068:
       … while calling 'toSource'
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/default.nix:1:11946:
       … while evaluating a branch condition
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/default.nix:1:13320:
       … in the left operand of the AND (&&) operator
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/default.nix:1:13360:
       … in the argument of the not operator
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/default.nix:1:13324:
       … from call site
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/default.nix:1:12160:
       … while calling '_coerce'
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/internal.nix:1:4147:
       … from call site
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/internal.nix:1:6089:
       … while calling '_singleton'
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/internal.nix:1:7685:
       … while evaluating a branch condition
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/internal.nix:1:7738:
       … while calling the 'readFileType' builtin
         at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/fileset/internal.nix:1:7712:
       error: path '/nix/var/nix/profiles/per-user/root/channels' is a symlink

To be clear though: I'm not sure if this is a rtfm moment. I'm following instructions from a disparate batch of sources trying to figure out how to get a library so that I can build something, nix-index was recommended, now I'm here and somewhat baffled. Maybe I shouldn't be here? But I'm confused either way. Here's my configuration.nix, let me know if I'm doing anything stupid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions