mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Merge remote-tracking branch 'origin/master' into flakes
This commit is contained in:
commit
2cc248c4fd
8 changed files with 50 additions and 38 deletions
|
@ -49,6 +49,19 @@ static void prim_fromTOML(EvalState & state, const Pos & pos, Value * * args, Va
|
|||
visit(*(v.listElems()[i] = state.allocValue()), t2->get()[i]);
|
||||
}
|
||||
|
||||
// Handle cases like 'a = [[{ a = true }]]', which IMHO should be
|
||||
// parsed as a array containing an array containing a table,
|
||||
// but instead are parsed as an array containing a table array
|
||||
// containing a table.
|
||||
else if (auto t2 = t->as_table_array()) {
|
||||
size_t size = t2->get().size();
|
||||
|
||||
state.mkList(v, size);
|
||||
|
||||
for (size_t j = 0; j < size; ++j)
|
||||
visit(*(v.listElems()[j] = state.allocValue()), t2->get()[j]);
|
||||
}
|
||||
|
||||
else if (t->is_value()) {
|
||||
if (auto val = t->as<int64_t>())
|
||||
mkInt(v, val->get());
|
||||
|
|
|
@ -767,8 +767,7 @@ StoreType getStoreType(const std::string & uri = settings.storeUri.get(),
|
|||
const std::string & stateDir = settings.nixStateDir);
|
||||
|
||||
/* Return the default substituter stores, defined by the
|
||||
‘substituters’ option and various legacy options like
|
||||
‘binary-caches’. */
|
||||
‘substituters’ option and various legacy options. */
|
||||
std::list<ref<Store>> getDefaultSubstituters();
|
||||
|
||||
|
||||
|
|
|
@ -113,15 +113,6 @@ static void update(const StringSet & channelNames)
|
|||
}
|
||||
|
||||
if (!unpacked) {
|
||||
// The URL doesn't unpack directly, so let's try treating it like a full channel folder with files in it
|
||||
// Check if the channel advertises a binary cache.
|
||||
DownloadRequest request(url + "/binary-cache-url");
|
||||
try {
|
||||
auto dlRes = dl->download(request);
|
||||
extraAttrs = "binaryCacheURL = \"" + *dlRes.data + "\";";
|
||||
} catch (DownloadError & e) {
|
||||
}
|
||||
|
||||
// Download the channel tarball.
|
||||
try {
|
||||
filename = dl->downloadCached(store, CachedDownloadRequest(url + "/nixexprs.tar.xz")).path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue