Skip to content

Flake not accessible through symlink #8013

@jtojnar

Description

@jtojnar

Describe the bug

Trying to access a flake though a symlink fails with the following error:

error: path '/tmp/nixfiles' is not a flake (because it's not a directory)

Steps To Reproduce

  1. Create a symlink to a flake.
  2. Try to build a derivation through the symlink.
$ ln -s ~/Projects/nixfiles/ /tmp/nixfiles
$ nix build /tmp/nixfiles#hello
error: path '/tmp/nixfiles' is not a flake (because it's not a directory)

Expected behavior

It should resolve the symlink and work with the target directory

nix-env --version output

nix (Nix) 2.14.1

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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