Skip to content

2.16 regression: invoking nix-shell -p: overlays.nix should be a file #8443

Description

@SFrijters

Describe the bug

$ nix-shell --packages jq
error:
       … <borked>

         at «none»:0: (source not available)

       … while evaluating a branch condition

         at /nix/store/8arv4302k0fi1ix92gipxwggzycvyzmj-source/lib/trivial.nix:386:27:

          385|   */
          386|   throwIfNot = cond: msg: if cond then x: x else throw msg;
             |                           ^
          387|

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

       error: /home/frijters/.config/nixpkgs/overlays.nix should be a file
$ nix --version
nix (Nix) 2.16.0

It works fine on 2.15.1.

My overlays.nix file is a symlink; I also tried having overlays.nix be a regular file while the nixpkgs directory is a symlink: same error.

Steps To Reproduce

See above.

Expected behavior

nix-shell should not care about how I organize my overlays.

nix-env --version output

nix-env (Nix) 2.16.0

Additional context

Add any other context about the problem here.

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions