aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-03-25 14:04:18 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-03-25 14:04:18 +0100
commit86b05ccd54f2e98ac2b5cef3bcecb29ed6ec4fd8 (patch)
tree1bfdc7d899ca7fd8adde25fc30202d3cdb2f8d20 /src/libexpr/primops.hh
parent55bc52401966fbffa525c574c14f67b00bc4fb3a (diff)
Only provide builtin.{getFlake,fetchClosure} is the corresponding experimental feature is enabled
This allows writing fallback code like if builtins ? fetchClosure then builtins.fetchClose { ... } else builtins.storePath ...
Diffstat (limited to 'src/libexpr/primops.hh')
-rw-r--r--src/libexpr/primops.hh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/primops.hh b/src/libexpr/primops.hh
index 5b16e075f..905bd0366 100644
--- a/src/libexpr/primops.hh
+++ b/src/libexpr/primops.hh
@@ -16,6 +16,7 @@ struct RegisterPrimOp
size_t arity = 0;
const char * doc;
PrimOpFun fun;
+ std::optional<ExperimentalFeature> experimentalFeature;
};
typedef std::vector<Info> PrimOps;
@@ -35,6 +36,7 @@ struct RegisterPrimOp
/* These primops are disabled without enableNativeCode, but plugins
may wish to use them in limited contexts without globally enabling
them. */
+
/* Load a ValueInitializer from a DSO and return whatever it initializes */
void prim_importNative(EvalState & state, const Pos & pos, Value * * args, Value & v);