mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
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 ...
This commit is contained in:
parent
55bc524019
commit
86b05ccd54
8 changed files with 31 additions and 39 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue