-
-
Notifications
You must be signed in to change notification settings - Fork 2k
add fetchTree docs #6740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add fetchTree docs #6740
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,8 +182,26 @@ static void prim_fetchTree(EvalState & state, const PosIdx pos, Value * * args, | |
| fetchTree(state, pos, args, v, std::nullopt, FetchTreeParams { .allowNameArgument = false }); | ||
| } | ||
|
|
||
| // FIXME: document | ||
| static RegisterPrimOp primop_fetchTree("fetchTree", 1, prim_fetchTree); | ||
| static RegisterPrimOp primop_fetchTree({ | ||
| .name = "fetchTree", | ||
| .args = {"args"}, | ||
| .arity = 1, | ||
| .doc = R"( | ||
| Introduced in 2.4 | ||
|
|
||
| The fetcher infrastructure is exposed via the `fetchTree` built-in. | ||
|
|
||
| `builtins.fetchTree` allows fetching a source tree using any | ||
| backends supported by the fetcher infrastructure. It subsumes the | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't mention "fetcher infrastructure". Instead it can refer to the docs on flake references (https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#flake-references), specifically the attrset form. |
||
| functionality of existing built-ins like `fetchGit`, | ||
| `fetchMercurial` and `fetchTarball`. | ||
|
|
||
| `builtins.fetchTree` can be used to fetch | ||
| plain files over the `http(s)` and `file` protocols in addition to | ||
| directory tarballs. | ||
| )", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There should be one or two examples here of how to use It should also mention that |
||
| .fun = prim_fetchTree, | ||
| }); | ||
|
|
||
| static void fetch(EvalState & state, const PosIdx pos, Value * * args, Value & v, | ||
| const std::string & who, bool unpack, std::string name) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.