1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

Merge pull request #4988 from NixOS/fetchgit-name-attribute

Add a name attribute to the fetchers
This commit is contained in:
Eelco Dolstra 2021-07-08 14:33:49 +02:00 committed by GitHub
commit 8648143120
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 41 additions and 12 deletions

View file

@ -129,6 +129,13 @@ static void fetchTree(
.errPos = pos
});
if (auto nameIter = attrs.find("name"); nameIter != attrs.end())
throw Error({
.msg = hintfmt("attribute 'name' isnt supported in call to 'fetchTree'"),
.errPos = pos
});
input = fetchers::Input::fromAttrs(std::move(attrs));
} else {
auto url = state.coerceToString(pos, *args[0], context, false, false);