Skip to content

Document builtins.getFlake #5523

Closed
Closed

Description

@lilyball

Describe the bug

Nix 2.4 introduced 4 new builtins: builtins.fetchTree, builtins.getFlake, builtins.floor, and builtins.ceil. The latter two have documentation in the repl with :doc but fetchTree and getFlake don't.

Similarly the manual includes documentation on floor and ceil but is missing getFlake and fetchTree.

The only reference to builtins.getFlake occurs in the Nix 2.4 release notes, where it says

builtins.getFlake fetches a flake and returns its output attributes. This function should not be used inside flakes! Use flake inputs instead.

This is also the only place that describes builtins.fetchTree, though the Lock files docs does reference builtins.fetchTree when describing the structure of the file.

The docs on lock files provide useful info on how to call builtins.fetchTree, but there's no info on how builtins.getFlake works. Experimentally, it accepts a string flake reference but without a fragment. It does not appear to accept the attrset style of flake input. I don't know if there's anything else it accepts, or any subtleties about what it takes as input.

Activity

  1. changed the title [-]New functions `builtins.getFlake` and `builtins.fetchTree` have no documentation[/-] [+]Document `builtins.getFlake`[/+] on Nov 10, 2021
  2. edolstra commented on Nov 10, 2021

    @edolstra
    Member

    Renamed this issue since we already have #5463 for fetchTree.

  3. added a commit that references this issue on Mar 25, 2022
    8c363eb
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