8000 flake refs: path-like syntax inconsistency? · Issue #16907 · NixOS/nix · GitHub
[go: up one dir, main page]

Skip to content

flake refs: path-like syntax inconsistency? #16907

Backlog

Description

@flokli

Describe the bug

https://nix.dev/manual/nix/2.35/command-ref/new-cli/nix3-flake.html#path-like-syntax describes Nix treating plain paths in flakeref context either as a git: or path: flakeref, depending on whether the passed directory is part of a git repository or not.

While this behaviour causes some headaches (parsing the strings alone is not sufficient to determine what type to return, you need IO), it doesn't seem to actually work as documented (always parses as path:):

Steps To Reproduce

Nix 2.35.6
Type :? for help.
nix-repl> builtins.flakeRefToString (builtins.parseFlakeRef "/home/flokli/dev/nixos/nixpkgs")
"path:/home/flokli/dev/nixos/nixpkgs"

Expected behavior

I don't know. I'd either expect that part of the docs to disappear, because it doesn't apply (anymore), or the behaviour described to exist?

Metadata

nix-env (Nix) 2.35.6

Additional context

Checklist


Add 👍 to issues you find important.

Activity

  1. changed the title [-]Path-like syntax inconsistency?[/-] [+]flake refs: path-like syntax inconsistency?[/+] on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0