1212#include " common-protocol-impl.hh"
1313#include < boost/container/small_vector.hpp>
1414#include < nlohmann/json.hpp>
15+ #include < optional>
1516
1617namespace nix {
1718
@@ -1512,10 +1513,10 @@ DerivationOptions adl_serializer<DerivationOptions>::from_json(const json & json
15121513 res.impureEnvVars = getStringList (valueAt (json, " impureEnvVars" ));
15131514 res.allowLocalNetworking = getBoolean (valueAt (json, " allowLocalNetworking" ));
15141515
1515- res.allowedReferences = optionalValueAt (json, " allowedReferences" );
1516- res.allowedRequisites = optionalValueAt (json, " allowedRequisites" );
1517- res.disallowedReferences = optionalValueAt (json, " disallowedReferences" );
1518- res.disallowedRequisites = optionalValueAt (json, " disallowedRequisites" );
1516+ res.allowedReferences = nullableValueAt (json, " allowedReferences" );
1517+ res.allowedRequisites = nullableValueAt (json, " allowedRequisites" );
1518+ res.disallowedReferences = nullableValueAt (json, " disallowedReferences" );
1519+ res.disallowedRequisites = nullableValueAt (json, " disallowedRequisites" );
15191520
15201521 res.requiredSystemFeatures = getStringList (valueAt (json, " requiredSystemFeatures" ));
15211522 res.preferLocalBuild = getBoolean (valueAt (json, " preferLocalBuild" ));
@@ -1531,8 +1532,8 @@ void adl_serializer<DerivationOptions>::to_json(json & json, DerivationOptions o
15311532 json[" impureEnvVars" ] = o.impureEnvVars ;
15321533 json[" allowLocalNetworking" ] = o.allowLocalNetworking ;
15331534
1534- json[" disallowedReferences " ] = o.allowedReferences ;
1535- json[" disallowedRequisites " ] = o.allowedRequisites ;
1535+ json[" allowedReferences " ] = o.allowedReferences ;
1536+ json[" allowedRequisites " ] = o.allowedRequisites ;
15361537 json[" disallowedReferences" ] = o.disallowedReferences ;
15371538 json[" disallowedRequisites" ] = o.disallowedRequisites ;
15381539
0 commit comments