1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

Merge pull request #11102 from fzakaria/issue-10532

doc: Add comment for fetchurl for name & url
This commit is contained in:
Eelco Dolstra 2024-07-22 15:49:41 +02:00 committed by GitHub
commit 56a2f7ab1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -529,9 +529,19 @@ static void prim_fetchurl(EvalState & state, const PosIdx pos, Value * * args, V
static RegisterPrimOp primop_fetchurl({
.name = "__fetchurl",
.args = {"url"},
.args = {"arg"},
.doc = R"(
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).
)",