From d7c37324bb77f8348a11f7fbf168fc1a085f2505 Mon Sep 17 00:00:00 2001 From: Alois Wohlschlager Date: Sat, 24 Aug 2024 14:39:45 +0200 Subject: libstore: declare SandboxMode JSON serialisation in the header The JSON serialisation should be declared in the header so that all translation units can see it when needed, even though it seems that it has not been used anywhere else so far. Unfortunately, this means we cannot use the NLOHMANN_JSON_SERIALIZE_ENUM convenience macro, since it uses a slightly different signature, but the code is not too bad either. Change-Id: I6e2851b250e0b53114d2fecb8011ff1ea9379d0f --- src/libstore/globals.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libstore/globals.hh') diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index 51550b2c3..ca2a917ed 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -14,6 +14,9 @@ namespace nix { typedef enum { smEnabled, smRelaxed, smDisabled } SandboxMode; +void to_json(nlohmann::json & j, const SandboxMode & e); +void from_json(const nlohmann::json & j, SandboxMode & e); + struct MaxBuildJobsSetting : public BaseSetting { MaxBuildJobsSetting(Config * options, -- cgit v1.2.3