1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

Apply suggestions from code review

Add @edolstra suggestion fixes.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
Farid Zakaria 2024-07-15 09:12:56 -07:00 committed by GitHub
parent a4ce96e5f1
commit 945fff5674
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -529,17 +529,16 @@ 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 = {"args"}, .args = {"arg"},
.doc = R"( .doc = R"(
If args is a URL, return the path of the downloaded file. Download the specified URL and return the path of the downloaded file.
Otherwise, it can be an attribute with the following attributes `arg` can be either a string denoting the URL, or an attribute set with the following attributes:
(all except url are optional):
- `url` - `url`
The URL of the file to download. The URL of the file to download.
- `name` (default: `url without the protocol`) - `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 A name for the file in the store. This can be useful if the URL has any
characters that are invalid for the store. characters that are invalid for the store.