Skip to content

Improve error message for missing pkgs #26

@rizo

Description

@rizo
nix develop -f default.nix -j auto -i -k TERM -k PATH -k HOME -v shell
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nix-shell'
         whose name attribute is located at /nix/store/zhzn4n299d4z0cxq50bmbm3sxxhaa7i8-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:334:7

       … while evaluating attribute 'buildInputs' of derivation 'nix-shell'

         at /nix/store/zhzn4n299d4z0cxq50bmbm3sxxhaa7i8-nixos/nixos/pkgs/stdenv/generic/make-derivation.nix:381:7:

          380|       depsHostHost                = elemAt (elemAt dependencies 1) 0;
          381|       buildInputs                 = elemAt (elemAt dependencies 1) 1;
             |       ^
          382|       depsTargetTarget            = elemAt (elemAt dependencies 2) 0;

       error: attribute '""' missing

       at /nix/store/gfh9vqp59rybks8mr7js7qb7qlki3xp0-source/nix/api.nix:325:38:

          324|       rootPkgNames = opamRootsToPackageNames config.opamFiles;
          325|       rootPkgs = builtins.map (name: allPkgs.${name}) rootPkgNames;
             |                                      ^
          326|
       Did you mean one of pp or re?
make: *** [onix.mk:4: shell] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions