mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
Merge pull request #11102 from fzakaria/issue-10532
doc: Add comment for fetchurl for name & url
This commit is contained in:
commit
56a2f7ab1d
1 changed files with 11 additions and 1 deletions
|
@ -529,9 +529,19 @@ static void prim_fetchurl(EvalState & state, const PosIdx pos, Value * * args, V
|
||||||
|
|
||||||
static RegisterPrimOp primop_fetchurl({
|
static RegisterPrimOp primop_fetchurl({
|
||||||
.name = "__fetchurl",
|
.name = "__fetchurl",
|
||||||
.args = {"url"},
|
.args = {"arg"},
|
||||||
.doc = R"(
|
.doc = R"(
|
||||||
Download the specified URL and return the path of the downloaded file.
|
Download the specified URL and return the path of the downloaded file.
|
||||||
|
`arg` can be either a string denoting the URL, or an attribute set with the following attributes:
|
||||||
|
|
||||||
|
- `url`
|
||||||
|
|
||||||
|
The URL of the file to download.
|
||||||
|
|
||||||
|
- `name` (default: the last path component of the URL)
|
||||||
|
|
||||||
|
A name for the file in the store. This can be useful if the URL has any
|
||||||
|
characters that are invalid for the store.
|
||||||
|
|
||||||
Not available in [restricted evaluation mode](@docroot@/command-ref/conf-file.md#conf-restrict-eval).
|
Not available in [restricted evaluation mode](@docroot@/command-ref/conf-file.md#conf-restrict-eval).
|
||||||
)",
|
)",
|
||||||
|
|
Loading…
Reference in a new issue