From 7fef87caecd0d32435bb561f89ee64d7cf53d1ed Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 9 Jan 2024 01:09:03 +0100 Subject: [PATCH] Fix compilation error --- src/libfetchers/parser.hh | 2 +- src/libfetchers/schema.hh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libfetchers/parser.hh b/src/libfetchers/parser.hh index e700f8443ec..df5f20b3e5c 100644 --- a/src/libfetchers/parser.hh +++ b/src/libfetchers/parser.hh @@ -187,7 +187,7 @@ namespace nix::fetchers { this->parsers ); - schema = std::make_shared(Schema{attrSchema}); + schema = std::make_shared(attrSchema); this->attrSchema = std::get_if(&schema->choice); assert(this->attrSchema); } diff --git a/src/libfetchers/schema.hh b/src/libfetchers/schema.hh index 014c2d04f61..92238c0f699 100644 --- a/src/libfetchers/schema.hh +++ b/src/libfetchers/schema.hh @@ -42,6 +42,9 @@ struct Schema { std::variant choice; bool operator==(const Schema & other) const; + + Schema(Primitive && p) : choice(p) {}; + Schema(Attrs && p) : choice(p) {}; }; }